.. ==================================================
.. Header hierarchy
.. ==
.. --
.. ^^
.. ""
.. ;;
.. ,,
..
.. --------------------------------------------used to the update the records specified ------
.. Best Practice T3 reST: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/CheatSheet.html
.. Reference: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/Index.html
.. Italic *italic*
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap `__
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`Download Button` (explicit url text)
.. Anker for internal link: .. _`download`:
.. Add Image: .. image:: ./Images/a4.jpg
..
.. Add image with caption: .. figure:: ./Images/black_dot.png
.. :class: with-border
.. :width: 20px
.. Add Attachment (place in Documentation/_static): `Download CSV <_static/yourfile.csv>`__
..
.. Admonitions
.. .. note:: .. important:: .. tip:: .. warning::
.. Color: (blue) (orange) (green) (red)
..
.. Definition:
.. some text becomes strong (only one line)
.. description has to indented
..
.. Code Block: .. code-block:: sql
..
.. -*- coding: utf-8 -*- with BOM.
.. include:: Includes.txt
.. _`debug`:
Debug
=====
.. _`QFQ_LOG`:
.. _`dbg-qfq-log`
QFQ Log
-------
Setup in :ref:`configuration`
* *qfqLog*
* Filename where to log QFQ debug and error messages.
* File is relative to the `` or absolute (starting with '/').
* Content: error situations of QFQ and debug, if enabled.
All non SQL related information will be logged to QFQ log file.
.. _`SQL_LOG`:
SQL Log
-------
Setup in :ref:`configuration`
* *sqlLog*
* Filename where to log SQL queries and statistical data.
* File is relative to the `` or absolute (starting with '/').
* Content: SQL queries and timestamp, formName/formId, fe_user, success, affected rows, newly created record
id's and accessed from IP.
* The global setting can be overwritten by defining `sqlLog` inside of a QFQ tt-content record.
.. _`SQL_LOG_MODE`:
* *sqlLogMode: all|modify|error|none*
* *all*: logs every SQL statement.
* *modify*: logs only statements who might potentially change data.
* *error*: logs only queries which generate SQL errors.
* *none*: no query logging at all.
* The global setting can be overwritten by defining `sqlLogMode` inside of a QFQ tt-content record.
* *showDebugInfo = [yes|no|auto],[download]*
If active, displays additional information in the Frontend (FE). This is typically helpful during development.
* *yes*:
* Form:
* For every internal link/button, show tooltips with decoded SIP on mouseover.
* Shows an 'Edit form'-button (wrench symbol) on a form. The link points to the T3 page with the :ref:`form-editor`.
* Report: Will be configured per tt-content record.
*debugShowBodyText = 1*
* *no*: No debug info.
* *auto*: Depending if there is a Typo3 BE session, set internally:
* *showDebugInfo = yes* (BE session exist)
* *showDebugInfo = no* (no BE session)
* *download*:
* During a download (especially by using wkhtml), temporary files are not deleted automatically. Also the
``wkhtmltopdf``, ``pdfunite``, ``pdf2img`` command lines will be logged to :ref:`QFQ_LOG`. Use this only to debug problems on download.
.. _`MAIL_LOG`:
MAIL Log
--------
Setup in :ref:`configuration`
* *mailLog*
* File which `sendEmail` logs sending mail.
* File is relative to the `` or absolute (starting with '/').
.. _`mail-log-page`:
Mail Log page (Table MailLog)
-----------------------------
For debugging purposes you may like to add a Mail Log page in the frontend.
The following QFQ code could be used for that purpose (put it in a QFQ PageContent element)
.. warning::
Use this code only on access restricted pages. GET/POST Parameter might be used to get access to unintended content.
Note: If you do not use/have the Ggroup table, then remove the "# Filters" block.
.. code-block:: sql
# Page parameters
{
sql = SELECT @grId := '{{grId:C0:digit}}' AS _grId
}
{
sql = SELECT @summary := IF('{{summary:CE:alnumx}}' = 'true', 'true', 'false') AS _s
}
filters {
sql = SELECT "'", gr.id, IF(gr.id = @grId, "' selected>", "'>"), gr.value, ' (Id: ', gr.id, ')'
FROM Ggroup AS gr
INNER JOIN MailLog AS ml ON ml.grId = gr.id
GROUP BY gr.id
head =
}
mailLog {
sql = SELECT id, '
', grId, '
', xId, '
'
, REPLACE(receiver, ',', ' '), '
', REPLACE(sender, ',', ' '), '
'
, DATE_FORMAT(modified, '%d.%m.%Y %H:%i:%s'), '
'
, CONCAT('', subject, ' ', IF(@summary = 'true', CONCAT(SUBSTR(body, 1
, LEAST(IF(INSTR(body, '\n') = 0, 50, INSTR(body, '\n')), IF(INSTR(body, ' ') = 0, 50
, INSTR(body, ' ')))-1), ' ...'), CONCAT(' ', REPLACE(body, '\n', ' '))) )
FROM MailLog
WHERE (grId = @grId OR @grId = 0)
ORDER BY modified DESC
LIMIT 100
head =
Id
grId
xId
To
From
Date
E-Mail
tail =
rbeg =
rend =
}
.. _`MERGE_LOG`:
Merge Log
---------
Setup in :ref:`configuration`. See also :ref:`merge-data`.
* *mergeLog*
* Filename where to log QFQ merge messages.
* File is relative to the `` or absolute (starting with '/').
* Content: protocoll of all merge actions.
.. _`dbg-error-exception`:
Error / Exception
-----------------
* Any error will be log and shown in the FE together with a uniqe timestamp.
.. figure:: ./Images/exception-message-user.png
* If a deloper is logged in the BE at the time of the error in the FE, than the error/exception message shows some
additional information.
* For efficient debugging, read the error message!
* In case of a SQL error, QFQ tries to underline the part in the query where the MySQL error message points to!
* Also the query will be shown `before` and `after` evaluation.
* `After evaluation` makes it very easy to copy/paste the query and to run it in SQL directly (e.g. `mysql` or `phpmyadmin`).
.. figure:: ./Images/exception-message.png
.. _`REDIRECT_ALL_MAIL_TO`:
Redirect all mail to (catch all)
--------------------------------
Setup in :ref:`configuration`
* *redirectAllMailTo=john@doe.com[,jane@doe.com[,fallBack@doe.com]]*
* During the development, it might be helpful to configure a 'catch all' email address, which QFQ uses as the final receiver
instead of the original intended one.
* The setting will:
* Replace the 'To' with the configured one.
* Clear 'CC' and 'Bcc'
* Write a note and the original configured receiver at the top of the email body.
* If more than one email address is given, QFQ compares all of them (in the order given) with the logged in FE and BE
User email address (which might be configured in T3). If a match is found, that one is the final 'redirectAllMailTo'
address. If there is no match found, take the last email address - this behaves like a fallback.
.. _`dbg-show-log-files-realtime`
Show log files realtime
-----------------------
.. warning::
Use this code only on access restricted pages. GET/POST Parameter might be used to get access to unintended content.
Display QFQ log files in realtime. Put the following code in a QFQ page content element.
.. code-block:: sql
#
# {{logfile:SU}}
#
# Show buttons to select log file.
{
sql = SELECT '{{logfile:SU:::sql.log}}' AS '_logfile:U'
head =
tail =
20.sql = SELECT CONCAT('p:{{pageSlug:T}}?logfile=sql.log|t:sql.log|b:', IF('{{logfile:R}}'='sql.log','primary','')) AS _page, ' '
, CONCAT('p:{{pageSlug:T}}?logfile=qfq.log|t:qfq.log|b:', IF('{{logfile:R}}'='qfq.log','primary','')) AS _page, ' '
, CONCAT('p:{{pageSlug:T}}?logfile=mail.log|t:mail.log|b:', IF('{{logfile:R}}'='mail.log','primary','')) AS _page
}
# Show selected log file.
{
sql = SELECT 'file:{{qfqProjectPath:Y}}/log/{{logfile:U}}' AS _monitor
head =
Please wait
}
**NOTE**: The `log` directory has been moved into `qfqProject` with a recent upgrade of QFQ. For backwards compatibility
logs are still stored in `fileadmin/protected/log/` if that directory already exists.
.. _`form-submit-log-page`:
Form Submit Log page
--------------------
.. warning::
Use this code only on access restricted pages. GET/POST Parameter might be used to get access to unintended content.
Check the Form Submit Log page to see what have been submitted. Put the following code in a QFQ page content element.
.. code-block:: sql
#
# Show all form submit. Optional filter by Form or FeUser.
#
# {{formId:SC0}}
# {{feUser:SCE:alnumx}}
{
# Filters
sql = SELECT ''
shead =
# Dropdown: Form
{
sql = SELECT "'", f.id, IF( f.id = '{{formId:SC0}}', "' selected>", "'>"), f.name, ' (', QIFEMPTY(COUNT(fsl.id),'-'), ')'
FROM Form AS f
LEFT JOIN FormSubmitLog AS fsl
ON fsl.formId=f.id
GROUP BY f.id
ORDER BY f.name
head =
rbeg =
')
, CONCAT("")
FROM FormSubmitLog AS l
LEFT JOIN Form AS f
ON f.id = l.formId
WHERE (l.formId = '{{formId:SC0}}' OR '{{formId:SC0}}' = 0)
AND (l.feUser = '{{feUser:SCE:alnumx}}' OR '{{feUser:SCE:alnumx}}' = '')
ORDER BY l.created DESC
LIMIT 100
head =
Id
Environment
Submitted Data
tail =
rbeg =
renr =
fbeg =
fend =
}
.. _`dbg-dev-panel`
Dev Panel
---------
Activate the Dev Panel
^^^^^^^^^^^^^^^^^^^^^^
The Dev Panel will automatically appear on the screen if you are logged into the TYPO3 backend.
It is displayed as a small button in the bottom-right corner of the screen.
.. image:: activate_button.png
:alt: Dev Panel Toggle Button
Clicking the button will slide out the Dev Panel.
.. image:: dev_panel_opened.png
:alt: Dev Panel Opened
You will see several tabs, each representing a specific function. You can switch between them by clicking on the tab headers. The active tab is highlighted.
Each tab has a small indicator dot:
- **Green**: Data loaded successfully
- **Blue**: Waiting/loading
- **Red**: Failed to load data from the backend
Bottom Buttons
^^^^^^^^^^^^^^
The bottom buttons are always visible, even when switching tabs.
**Clear Dirty**
- Clears the *dirty* table in the database.
- Useful when a form is locked (e.g. stale session).
- Prompts for confirmation before execution.
- Button turns green on success, red on failure.
.. image:: button_clear_dirty.png
:alt: Clear Dirty Button
**Apply Changes**
- Applies temporary changes to Store variables.
- Confirms action before applying.
- Reloads the page to activate the changes.
- A banner shows when changes are active.
- Reload the page to revert.
.. image:: button_apply_changes.png
:alt: Apply Changes Button
.. warning::
Although these changes are temporary for the session, QFQ might still trigger real actions
(e.g. file creation, SQL inserts). Modifying a Store variable that affects backend behavior will not be reversed automatically.
**Close Panel**
- The arrow button on the right closes the Dev Panel.
.. image:: button_close_panel.png
:alt: Close Dev Panel Button
:align: center
.. _`dbg-dev-panel-tabs`
Tabs Overview
^^^^^^^^^^^^^
**Stores Tab**
- Lists available QFQ Stores (e.g. Record, Client, SIP, User, System, TYPO3).
- Clicking a store expands its variable list.
- Allows editing (if permitted).
- Use **Apply Changes** to save modifications.
.. image:: tab_stores.png
:alt: Stores Tab
:align: center
**Logs Tab**
- Shows last 50 lines of each log file (QFQ, SQL, Mail).
- Live-updates log content.
- Logs can be downloaded as full files.
.. warning::
Only 50 lines are shown in the panel, but the download contains the full file.
.. image:: tab_logs.png
:alt: Logs Tab
:align: center
**Info Tab**
Displays key system information, including:
- TYPO3 version
- QFQ version
- PHP version
- Webserver and DB details
.. image:: tab_info.png
:alt: Info Tab
:align: center
**Gen Link Tab**
Used to generate SIP links.
.. image:: tab_gen_link.png
:alt: Gen Link Tab
:align: center
You can:
- Enter key-value pairs (`form=myform&action=edit`)
- Paste a full query URL (`http://webwork20:36393/?form=myForm&action=edit`)
**Performance Tab**
- Lists all SQL queries executed on the current page
- Shows execution time in milliseconds
- Queries can be expanded to view full content
.. image:: tab_performance.png
:alt: Performance Tab
:align: center