Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • typo3/qfq
1 result
Show changes
Commits on Source (54)
Showing
with 533 additions and 310 deletions
......@@ -78,3 +78,4 @@ composer.lock
__pycache__
package-lock.json
/extension/.phpunit.result.cache
......@@ -25,6 +25,7 @@ warning::
Release
=======
Version 23.x.x
--------------
......@@ -36,6 +37,45 @@ Features ^^^^^^^^
Bug Fixes ^^^^^^^^^
Version 23.3.1
--------------
Date: 31.03.2023
Bug Fixes ^^^^^^^^^
* # 15920 / QFQ variable evaluation broken: wrong variable name
Version 23.3.0
--------------
Date: 30.03.2023
Features ^^^^^^^^
* # 15491 / Search refactor redesign and T3 V10 compatiblity: underscore character, counter fixed, page alias and slug handling.
* # 15529 / Form/subrecord: Design Titel / Box.
* # 15570 / Changed DB handling in class FormAction. Fixed multi-db problem with this. Included change for check of
existing form editor report.
* # 15579 / Ability for searching all possible characters, includes not replaced QFQ variables.
* # 15627 / Added character count and maxLength feature for TinyMCE.
* Add various icons to documentation.
* Doc Form.rst: reference 'orderColumn'.
* Doc Report.rst: fix typo, add icons, improved example for tablesorter.
* Add indexes for table FormSubmitLog.
* FormEditor: Show Tablename in pill 'table definition'.
* FormEditor: FE subrecord > show container id below name.
Bug Fixes ^^^^^^^^^
* # 14754 / Using double quotes in tableview config caused sql error.
* # 15483 / Protected folder check fixed. Changed default of wget, preventing errors. Changed handling from protected
folder check, new once a day.
* # 15521 / FormEditor assigns always container, even none is selected. Change handling of form variables from type select,
radio and checkbox. Expected 0 from client request instead of empty string.
* # 15523 / Search/Refactor broken for Multi-DB.
* # 15626 / Multi-DB: FormEditor save error.
Version 23.2.0
--------------
......@@ -49,17 +89,19 @@ Notes ^^^^^
Features ^^^^^^^^
* 7650 / For FormElement which are required: `indicateRequired=0|1` show or hide the 'required asterix'.
* 10013 / FormEditor: Several textarea inputs changed to 'editor' incl. SQL syntax highlighting.
* 14995 / Support for refactoring: search in QFQ Form/FormElement and Typo3 pages/tt-content tables.
* # 7650 / For FormElement which are required: `indicateRequired=0|1` show or hide the 'required asterix'.
* # 10013 / FormEditor: Several textarea inputs changed to 'editor' incl. SQL syntax highlighting.
* # 14995 / Support for refactoring: search in QFQ Form/FormElement and Typo3 pages/tt-content tables.
* QMANR: SQL prepared function to format Swiss Matrikelnumbers
Bug Fixes ^^^^^^^^^
* 8668 / Fix that if a pill becomes disabled, child FE should not respected during save.
* 15168 / Fixed language form save problem for t3 v >= 9.
* 15420 / TypeAhead Prefetch triggers 'form changed' after save.
* 15482 / Added missing password font file.
* # 7899 / Fe.type=password / retype / required: always complain about missing value - bug has been fixed earlier.
* # 8668 / Fix that if a pill becomes disabled, child FE should not respected during save.
* # 15168 / Fixed language form save problem for t3 v >= 9.
* # 15420 / TypeAhead Prefetch triggers 'form changed' after save.
* # 15482 / Added missing password font file.
Version 23.1.1
--------------
......@@ -151,9 +193,9 @@ Notes ^^^^^
per QFQ installation and/or per form.
* Subrecord:
* Dynamically computed 'new' button in subrecord: FE.parameter.new. Use regular `... AS _link` syntax.
* Per row customizeable edit and delete button. Use special column name `_rowEdit` and `_rowDelete`. Use
regular `... AS _link` syntax.
* Dynamically computed 'new' button in subrecord: FE.parameter.new. Use regular `... AS _link` syntax.
* Per row customizeable edit and delete button. Use special column name `_rowEdit` and `_rowDelete`. Use
regular `... AS _link` syntax.
* Link/Tablesorter: New link qualifier `|Y:...` which is invisible to the user, but will be respected by tablesorter and
filter.
......@@ -231,8 +273,10 @@ Features ^^^^^^^^
Bug Fixes ^^^^^^^^^
* # 14618 / Changed logic behind getting first value from array (check for typeahead array was already given but was
placed after the checkForEncryptedValue function). No exception possible. Function name changed to generic. Added new
function is_multi_array to check if array is multidimensional and return true or false.
placed after the checkForEncryptedValue function). No exception possible. Function name changed to generic. Added new
function is_multi_array to check if array is multidimensional and return true or false.
* # 14736 / Datetimepicker: FormElement.parameter.dateFormat - required.
* # 14755 / Fix for typeahead problem in t3 v9 and higher. Typeahead url will be setup same as save.php. Results to an absolute path.
* # 14813 / Report: dbIndex - missing per level definition
......@@ -240,8 +284,6 @@ Bug Fixes ^^^^^^^^^
* # 14857 / String expected, array given.
* # 14885 / Fabric zoom problem.
Version 22.10.0
---------------
......@@ -747,8 +789,8 @@ Date: 25.06.2020
Bug Fixes
^^^^^^^^^
* #10641 / TypeAheadTag: Fehler beim gleichzeitigen anlegen mehrerer neuer Tags
* #10794 / Documentation: Crontab entry more clearly
* # 10641 / TypeAheadTag: Fehler beim gleichzeitigen anlegen mehrerer neuer Tags
* # 10794 / Documentation: Crontab entry more clearly
Version 20.6.1
......@@ -770,27 +812,27 @@ Date: 14.06.2020
Notes
^^^^^
* Add note in Installation.rst to start Apache with Locale en_US.UTF-8. This helps to support Umlaut and other characters
in filenames and wkhtml commandline options (like header/footer).
* Migrate documentation from T3 to ReadTheDocs.io - looks older but 'search' is much more better. New: chapters separated
in individual files.
* For the image to PDF feature, installation of `img2pdf` is required (please check :ref:`preparation`).
* Add note in Installation.rst to start Apache with Locale en_US.UTF-8. This helps to support Umlaut and other
characters in filenames and wkhtml commandline options (like header/footer).
* Migrate documentation from T3 to ReadTheDocs.io - looks older but 'search' is much more better. New: chapters
separated in individual files.
* For the image to PDF feature, installation of `img2pdf` is required (please check :ref:`preparation`).
Features
^^^^^^^^
* #10751 / Allow images to be concatenated for PDF download.
* Fontawesome updated 5.13.
* Extend FE.label size to 1023.
* Local documentation rendering directly via Sphinx.
* Manual: Search is working, table width not truncated anymore, PDF & epub export, redirect qfq.io/doc to docs.qfq.io.
* Update copyright notice.
* # 10751 / Allow images to be concatenated for PDF download.
* Fontawesome updated 5.13.
* Extend FE.label size to 1023.
* Local documentation rendering directly via Sphinx.
* Manual: Search is working, table width not truncated anymore, PDF & epub export, redirect qfq.io/doc to docs.qfq.io.
* Update copyright notice.
Bug Fixes
^^^^^^^^^
* #10507 / FormElement.type: 'annotate' is defined two times in Enum
* #10705 / New function 'HelperFile::joinPathFilename($pre, $post)'. Joins only if $post is without leading slash.
* # 10507 / FormElement.type: 'annotate' is defined two times in Enum
* # 10705 / New function 'HelperFile::joinPathFilename($pre, $post)'. Joins only if $post is without leading slash.
Version 20.4.1
......@@ -3450,11 +3492,10 @@ Changes
* Table `FormElement`:
* Modified column: `checkType` - new value `numerical`.
* Modified column: `checkType` - new value `numerical`.
ALTER TABLE FormElement MODIFY COLUMN checkType ENUM('alnumx','digit','numerical','email','min|max','min|max
date',
'pattern','allbut','all') NOT NULL DEFAULT 'alnumx'
ALTER TABLE FormElement MODIFY COLUMN checkType ENUM('alnumx','digit','numerical','email','min|max','min|max date',
'pattern','allbut','all') NOT NULL DEFAULT 'alnumx'
* Example Report for `forms` extended by a delete button per row.
......@@ -3501,22 +3542,22 @@ Changes
^^^^^^^
* Table 'FormElement'
* New column: rowLabelInputNote:
* New column: rowLabelInputNote:
ALTER TABLE `FormElement` ADD `rowLabelInputNote` set('row','label','/label','input','/input','note','/note','
/row')
NOT NULL DEFAULT 'row,label,/label,input,/input,note,/note,/row' AFTER `bsNoteColumns` ;
ALTER TABLE `FormElement` ADD `rowLabelInputNote` set('row','label','/label','input','/input','note','/note','
/row')
NOT NULL DEFAULT 'row,label,/label,input,/input,note,/note,/row' AFTER `bsNoteColumns` ;
* Modified column: 'type' - new value 'templateGroup':
* Modified column: 'type' - new value 'templateGroup':
ALTER TABLE `FormElement` CHANGE `type` `type` ENUM( 'checkbox', 'date', 'datetime', 'dateJQW', '
datetimeJQW', 'extra',
'gridJQW', 'text', 'editor', 'time', 'note', 'password', 'radio', 'select', 'subrecord', 'upload', '
fieldset', 'pill',
'templateGroup', 'beforeLoad', 'beforeSave', 'beforeInsert', 'beforeUpdate', 'beforeDelete', 'afterLoad', '
afterSave',
'afterInsert', 'afterUpdate', 'afterDelete', 'sendMail' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
DEFAULT 'text'
ALTER TABLE `FormElement` CHANGE `type` `type` ENUM( 'checkbox', 'date', 'datetime', 'dateJQW', '
datetimeJQW', 'extra',
'gridJQW', 'text', 'editor', 'time', 'note', 'password', 'radio', 'select', 'subrecord', 'upload', '
fieldset', 'pill',
'templateGroup', 'beforeLoad', 'beforeSave', 'beforeInsert', 'beforeUpdate', 'beforeDelete', 'afterLoad', '
afterSave',
'afterInsert', 'afterUpdate', 'afterDelete', 'sendMail' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
DEFAULT 'text'
* formEditor.sql: Added HTML 'placeholder' in FormEditor for bs*Columns.
......@@ -3587,19 +3628,19 @@ Bug fixes
* User manual:
* Fixed double include of validator.js in T3 Typoscript template example.
* Fixed wrong store name SYSTEM: S > Y.
* Fixed wrong STORE_FORM variable names.
* Reformat FormElement.parameter description.
* Styling errors fixed.
* Fixed double include of validator.js in T3 Typoscript template example.
* Fixed wrong store name SYSTEM: S > Y.
* Fixed wrong STORE_FORM variable names.
* Reformat FormElement.parameter description.
* Styling errors fixed.
* Use of 'decryptCurlyBraces()' to get better error messages.
* Skip unwanted parameter expansion during save.
* Fixed bug with uninitialized FE_SLAVE_ID.
* formEditor.sql:
* The defintion as 'editor' (not text) for FormElement 'note' has been lost - reinserted.
* Fixed problem while playing SQL query - deleting old FormElements of Formeditor deleted also FormElements of other
forms.
* The defintion as 'editor' (not text) for FormElement 'note' has been lost - reinserted.
* Fixed problem while playing SQL query - deleting old FormElements of Formeditor deleted also FormElements of other
forms.
* # 3066 / help-text with-error - CSS class 'hidden' will be rendered by default (as long there is no error).
* Labels are skipped, if FormElement.bsLabelColumns=0.
* Respect attribute `data-class-on-change` on save buttons.
......
......@@ -44,7 +44,7 @@ Neue Versionsnummer
**Achtung**: die Release Minor darf KEINE fuehrenden Nullen enthalten!!! Ansonsten funktioniert die Verteilung vie
TER nicht.
**Auto**: ./setVersion.sh 23.2.0
**Auto**: ./setVersion.sh 23.3.1
Manuell:
......@@ -56,20 +56,20 @@ Neue Versionsnummer
* **Commit & Push** to develop branch:
New version 23.2.0
New version v23.3.1
6)
* Merge 'Develop' to **Master**.
* Merge 'Develop' to **Master**: git.math.uzh.ch > QFQ > Merge Requests > New merge request > 'Develop >> Master'
* Checkout **Master**.
7) **New Tag**:
# Neuen tag via Browser auf dem **master** branch zu setzen.
* Neuen tag via Browser auf dem **master** branch setzen: git.math.uzh.ch > QFQ > Repository > Tags > New tag
Tag: v23.2.0
Tag: v23.3.1
# Den tag mit diesem Command zu setzen scheint den Build Prozess nicht zu trigger.
git tag -a v23.2.0 -m 'New version v23.2.0' git push
git tag -a v23.3.1 -m 'New version v23.3.1' git push
7) **Merge 'master' into 'develop'**
......
# Phpunit
* Versions: https://phpunit.de/supported-versions.html
* Installation: https://phpunit.de/getting-started/phpunit-9.html
* Doc: https://docs.phpunit.de/
* Doc um Exceptions zu testen: https://docs.phpunit.de/en/9.6/writing-tests-for-phpunit.html
## TODO: if (!defined('PHPUNIT_QFQ')) {...}
rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}
## Run unit tests from CLI:
Make sure dev dependencies are installed:
```shell script
# in extension directory
composer update --dev
```
Run all tests:
```shell script
# in extension directory
vendor/bin/phpunit --configuration phpunit.xml
```
Run single test:
```shell script
# in extension directory
vendor/bin/phpunit --configuration phpunit.xml --filter <test_name>
```
## Setup
Requirements for running the php unittests:
- `make bootstrap` was executed
- The following files exist at the same location (either `extension/` or `typo3conf/`):
* `qfq.json`
* `LocalConfiguration.php`
- The database credentials in `qfq.json` are correct
- The database with the name `DB_1_NAME` followed by `_phpunit` exists. E.g. `app_qfq_phpunit` where `DB_1_NAME=app_qfq`
In Tests/Unit/ you may find a mockup of `LocalConfiguration.php`
and a template for `qfq.json`.
## Run unit tests from commandline
REMARK: Running the unit tests without specifying the configuration file `phpunit.xml` will not work. See section "
Autoloader" for explanation.
From the extension folder run:
`vendor/bin/phpunit --configuration phpunit.xml`
## Phpunit configurations
Phpunit configurations are stored in extension/phpunit.xml Running the tests without specifying these configurations
will not work.
## Autoloader
The test classes use the composer autoloader to reference to the source classes. The autoloader is loaded by phpunit
before each test as specified in phpunit.xml by the line `<phpunit bootstrap="vendor/autoload.php">`
## Run tests without typo3 installation (e.g. gitlab runner)
As defined in the phpunit command of projectRoot/Makefile.
The files phpunit_qfq.json and phpunit_LocalConfiguration.php are copied outside the extension folder by the Makefile.
......@@ -38,6 +38,7 @@
Release
=======
Version 23.x.x
--------------
......@@ -52,6 +53,48 @@ Features
Bug Fixes
^^^^^^^^^
Version 23.3.1
--------------
Date: 31.03.2023
Bug Fixes
^^^^^^^^^
* #15920 / QFQ variable evaluation broken: wrong variable name
Version 23.3.0
--------------
Date: 30.03.2023
Features
^^^^^^^^
* #15491 / Search refactor redesign and T3 V10 compatiblity: underscore character, counter fixed, page alias and slug handling.
* #15529 / Form/subrecord: Design Titel / Box.
* #15570 / Changed DB handling in class FormAction. Fixed multi-db problem with this. Included change for check of
existing form editor report.
* #15579 / Ability for searching all possible characters, includes not replaced QFQ variables.
* #15627 / Added character count and maxLength feature for TinyMCE.
* Add various icons to documentation.
* Doc Form.rst: reference 'orderColumn'.
* Doc Report.rst: fix typo, add icons, improved example for tablesorter.
* Add indexes for table FormSubmitLog.
* FormEditor: Show Tablename in pill 'table definition'.
* FormEditor: FE subrecord > show container id below name.
Bug Fixes
^^^^^^^^^
* #14754 / Using double quotes in tableview config caused sql error.
* #15483 / Protected folder check fixed. Changed default of wget, preventing errors. Changed handling from protected
folder check, new once a day.
* #15521 / FormEditor assigns always container, even none is selected. Change handling of form variables from type select,
radio and checkbox. Expected 0 from client request instead of empty string.
* #15523 / Search/Refactor broken for Multi-DB.
* #15626 / Multi-DB: FormEditor save error.
Version 23.2.0
--------------
......@@ -67,19 +110,19 @@ Notes
Features
^^^^^^^^
* 7650 / For FormElement which are required: `indicateRequired=0|1` show or hide the 'required asterix'.
* 10013 / FormEditor: Several textarea inputs changed to 'editor' incl. SQL syntax highlighting.
* 14995 / Support for refactoring: search in QFQ Form/FormElement and Typo3 pages/tt-content tables.
* QMANR: SQL prepared function to format Swiss Matrikelnumbers
* #7650 / For FormElement which are required: `indicateRequired=0|1` show or hide the 'required asterix'.
* #10013 / FormEditor: Several textarea inputs changed to 'editor' incl. SQL syntax highlighting.
* #14995 / Support for refactoring: search in QFQ Form/FormElement and Typo3 pages/tt-content tables.
* QMANR: SQL prepared function to format Swiss Matrikelnumbers
Bug Fixes
^^^^^^^^^
* 7899 / Fe.type=password / retype / required: always complain about missing value - bug has been fixed earlier.
* 8668 / Fix that if a pill becomes disabled, child FE should not respected during save.
* 15168 / Fixed language form save problem for t3 v >= 9.
* 15420 / TypeAhead Prefetch triggers 'form changed' after save.
* 15482 / Added missing password font file.
* #7899 / Fe.type=password / retype / required: always complain about missing value - bug has been fixed earlier.
* #8668 / Fix that if a pill becomes disabled, child FE should not respected during save.
* #15168 / Fixed language form save problem for t3 v >= 9.
* #15420 / TypeAhead Prefetch triggers 'form changed' after save.
* #15482 / Added missing password font file.
Version 23.1.1
......@@ -95,19 +138,19 @@ Notes
Features
^^^^^^^^
* #11980 / check protected folder for access from outside after new qfq installation or update.
* #13566 / Cleanup: Delete config-example.qfq.php
* #15053 / New dynamic QFQ config option: fillStoreSystemBySqlRow.
* Update SANITIZE_ALLOW_EMAIL_MESSAGE to be more generic: 'Invalid email format'
* Update Documentation/Form.rst: Added QFQ Function QMANR(manr), broken ref to restAuthorization, fixed typos.
* Update copyright year
* #11980 / check protected folder for access from outside after new qfq installation or update.
* #13566 / Cleanup: Delete config-example.qfq.php
* #15053 / New dynamic QFQ config option: fillStoreSystemBySqlRow.
* Update SANITIZE_ALLOW_EMAIL_MESSAGE to be more generic: 'Invalid email format'
* Update Documentation/Form.rst: Added QFQ Function QMANR(manr), broken ref to restAuthorization, fixed typos.
* Update copyright year
Bug Fixes
^^^^^^^^^
* #2665 / Fixed not working dynamic update with tinymce and codemirror. Improved frontend edit visualization, elements in window will be resized automatically.
* #11517 / Fixed Bug not showing extraInfoButton on certain FormElements like: TextArea, Select, Checkbox, Radio, Upload, Editor.
* #12066 / Form: Enter as submit forward not working.
* #2665 / Fixed not working dynamic update with tinymce and codemirror. Improved frontend edit visualization, elements in window will be resized automatically.
* #11517 / Fixed Bug not showing extraInfoButton on certain FormElements like: TextArea, Select, Checkbox, Radio, Upload, Editor.
* #12066 / Form: Enter as submit forward not working.
Version 23.1.0
--------------
......@@ -117,25 +160,25 @@ Date: 05.01.2023
Features
^^^^^^^^
* #6250 / Enhance layout subrecord.
* #10003 / Fieldset: stronger visualize group.
* #15036 / FormElement subrecord summary additional row(s).
* #15154 / FormElement input check via regexp: trim whitespace before regexp.
* #6250 / Enhance layout subrecord.
* #10003 / Fieldset: stronger visualize group.
* #15036 / FormElement subrecord summary additional row(s).
* #15154 / FormElement input check via regexp: trim whitespace before regexp.
Bug Fixes
^^^^^^^^^
* #14305 / Bug "No form found with this id".
* #14997 / Tablesorter: Filter value shown but no effect after 'Browser Back'
* #15191 / Broken datepicker in template group.
* #15214 / Inline report save history.
* #15229 / Typeahead and qfq-clear-me will be initialized after adding new fields.
* #15230 / Set own button class for dropdown.
* #15314 / FE & BE Email now filled in 'sipForTypo3Vars' and therefore available in API calls.
* #15316 / config.baseUrl might be overwritten if no scheme or multiple urls are given.
* Doc: Fix missing ! in doc: sqlValidate. Fix index undefined htmlAllow. Fix filemtime() Warning.
* Fixed date to datetime convert bug.
* Fixed error coming from typeahead when array is empty.
* #14305 / Bug "No form found with this id".
* #14997 / Tablesorter: Filter value shown but no effect after 'Browser Back'
* #15191 / Broken datepicker in template group.
* #15214 / Inline report save history.
* #15229 / Typeahead and qfq-clear-me will be initialized after adding new fields.
* #15230 / Set own button class for dropdown.
* #15314 / FE & BE Email now filled in 'sipForTypo3Vars' and therefore available in API calls.
* #15316 / config.baseUrl might be overwritten if no scheme or multiple urls are given.
* Doc: Fix missing ! in doc: sqlValidate. Fix index undefined htmlAllow. Fix filemtime() Warning.
* Fixed date to datetime convert bug.
* Fixed error coming from typeahead when array is empty.
Version 22.12.1
......@@ -153,21 +196,21 @@ Notes
Features
^^^^^^^^
* #5715 / Caching for on the fly rendred files (PDF, Excel, ZIP).
* #6250 / Enhance form layout: a) Subrecord, b) Subrecord-Title
* #9927 / Do QFQ Update (config, table defintion) only if there is a BE user logged in the current session.
* #12503 / Detect likely unwanted UPDATE statement with missing WHERE.
* New Button Sizes: btn-tiny, btn-small
* #5715 / Caching for on the fly rendred files (PDF, Excel, ZIP).
* #6250 / Enhance form layout: a) Subrecord, b) Subrecord-Title
* #9927 / Do QFQ Update (config, table defintion) only if there is a BE user logged in the current session.
* #12503 / Detect likely unwanted UPDATE statement with missing WHERE.
* New Button Sizes: btn-tiny, btn-small
Bug Fixes
^^^^^^^^^
* #14305 / Inline Report edit saves history to Typo 3.
* #14506 / Tablesorter: after form close, already defined filter criteria in tablesorter will be applied.
* #15188 / Clean up config to T3 parameter.
* #15193 / No form found with this id error in MultiDB Setup.
* #15206 / Form Save: Internal Error in MultiDB Setup.
* Fix Doc: latest CCS/JS includes.
* #14305 / Inline Report edit saves history to Typo 3.
* #14506 / Tablesorter: after form close, already defined filter criteria in tablesorter will be applied.
* #15188 / Clean up config to T3 parameter.
* #15193 / No form found with this id error in MultiDB Setup.
* #15206 / Form Save: Internal Error in MultiDB Setup.
* Fix Doc: latest CCS/JS includes.
Version 22.12.0
---------------
......@@ -238,11 +281,11 @@ Features
Bug Fixes
^^^^^^^^^
* #11325 / SQL CALL() - insert() and select() should be supported now.
* #14622 / FormElement `unexpected error` on save.
* #15005 / TypeAhead Dynamic Update Mode Hidden to Required
* #15014 / Excel import broken if multiple regions defined.
* #15048 / STORE_USER broken.
* #11325 / SQL CALL() - insert() and select() should be supported now.
* #14622 / FormElement `unexpected error` on save.
* #15005 / TypeAhead Dynamic Update Mode Hidden to Required
* #15014 / Excel import broken if multiple regions defined.
* #15048 / STORE_USER broken.
Version 22.10.1
---------------
......@@ -252,29 +295,29 @@ Date: 24.10.2022
Notes
^^^^^
* Migration of existing Typo3 V9 to V10: Check #12584, #12440
* Migration of existing Typo3 V9 to V10: Check #12584, #12440
Features
^^^^^^^^
* #12584, #12440 / Typo3 V10 Migration Script Replace Alias Patterns
* #14738 / Datetimepicker: verify various setups
* #14802 / DateTime own class and unit tests
* Add doc to table vertical column via CSS,
* Add qfq-badge-* to doc
* #12584, #12440 / Typo3 V10 Migration Script Replace Alias Patterns
* #14738 / Datetimepicker: verify various setups
* #14802 / DateTime own class and unit tests
* Add doc to table vertical column via CSS,
* Add qfq-badge-* to doc
Bug Fixes
^^^^^^^^^
* #14618 / Changed logic behind getting first value from array (check for typeahead array was already given but was
placed after the checkForEncryptedValue function). No exception possible. Function name changed to generic. Added new
function is_multi_array to check if array is multidimensional and return true or false.
* #14736 / Datetimepicker: FormElement.parameter.dateFormat - required.
* #14755 / Fix for typeahead problem in t3 v9 and higher. Typeahead url will be setup same as save.php. Results to an absolute path.
* #14813 / Report: dbIndex - missing per level definition
* #14844 / Fixed bug of no working dynamic update and empty output in Form Store with Datetimepicker.
* #14857 / String expected, array given.
* #14885 / Fabric zoom problem.
* #14618 / Changed logic behind getting first value from array (check for typeahead array was already given but was
placed after the checkForEncryptedValue function). No exception possible. Function name changed to generic. Added new
function is_multi_array to check if array is multidimensional and return true or false.
* #14736 / Datetimepicker: FormElement.parameter.dateFormat - required.
* #14755 / Fix for typeahead problem in t3 v9 and higher. Typeahead url will be setup same as save.php. Results to an absolute path.
* #14813 / Report: dbIndex - missing per level definition
* #14844 / Fixed bug of no working dynamic update and empty output in Form Store with Datetimepicker.
* #14857 / String expected, array given.
* #14885 / Fabric zoom problem.
......@@ -286,26 +329,26 @@ Date: 04.10.2022
Notes
^^^^^
* TinyMCE Feature "upload images via drag'n'drop" now supported.
* TinyMCE Feature "upload images via drag'n'drop" now supported.
Features
^^^^^^^^
* #14813 / Report: dbIndex - missing per level definition
* #12474 / Check BaseConfigURL if it is given and the the last char is '/'
* #12452 / baseUrl: add automatically '/' at end
* #10782 / Tiny MCE: Image Upload & Image drag'n'drop
* #14813 / Report: dbIndex - missing per level definition
* #12474 / Check BaseConfigURL if it is given and the the last char is '/'
* #12452 / baseUrl: add automatically '/' at end
* #10782 / Tiny MCE: Image Upload & Image drag'n'drop
Bug Fixes
^^^^^^^^^
* #14803 / MultiDB (different DB hosts): broken 'show table definition' in FormEditor -
* #14791 / datetimepicker: undefined index: timeParts[2]
* #14619 / Added note to missed bug fix.
* #12630 / Added code commentary. Reformatted code. getUniqueFileName function changed. New logFileMessages implemented.
* #14463 / llow statusbar (resize button included) to show as default.
* #14455 / Drag and drop triggers record lock.
* #13818 / htmlspecialchars_decode() - expects parameter 1 to be string, array given
* #14803 / MultiDB (different DB hosts): broken 'show table definition' in FormEditor -
* #14791 / datetimepicker: undefined index: timeParts[2]
* #14619 / Added note to missed bug fix.
* #12630 / Added code commentary. Reformatted code. getUniqueFileName function changed. New logFileMessages implemented.
* #14463 / llow statusbar (resize button included) to show as default.
* #14455 / Drag and drop triggers record lock.
* #13818 / htmlspecialchars_decode() - expects parameter 1 to be string, array given
Version 22.9.2
--------------
......@@ -315,13 +358,13 @@ Date: 22.09.2022
Features
^^^^^^^^
* #12630 / dateTimePicker refactored. Mode: 'qfq', 'browser', 'no'. Default: 'qfq'
* Add release notes to update UZH CD to latest version and to remove QFQ JS/CSS includes from custom typoscript template.
* #12630 / dateTimePicker refactored. Mode: 'qfq', 'browser', 'no'. Default: 'qfq'
* Add release notes to update UZH CD to latest version and to remove QFQ JS/CSS includes from custom typoscript template.
Bug Fixes
^^^^^^^^^
* #14619 / dateTimePicher: missing popup on first click, record not dirty
* #14619 / dateTimePicher: missing popup on first click, record not dirty
Version 22.9.1
--------------
......@@ -529,7 +572,7 @@ Bug Fixes
* #3446 / Unknown permission mode: 'logged_in'
* #9268 / SELECT with outer brackets not recognized as SELECT
* #13030 / Max length cuts - line endings \r\n has been counted as two chars. During input they are counted as 1 and
therefore on data load the string has been cutted.
therefore on data load the string has been cutted.
* #13139 / Tablesorter: some elements are in front of a sticky title row
* #13507 / QFQ function should work without 'sql='
* #13525 / makefile adjusted for multiple users
......@@ -811,8 +854,8 @@ Date: 25.06.2020
Bug Fixes
^^^^^^^^^
* #10641 / TypeAheadTag: Fehler beim gleichzeitigen anlegen mehrerer neuer Tags
* #10794 / Documentation: Crontab entry more clearly
* #10641 / TypeAheadTag: Fehler beim gleichzeitigen anlegen mehrerer neuer Tags
* #10794 / Documentation: Crontab entry more clearly
Version 20.6.1
......@@ -834,27 +877,27 @@ Date: 14.06.2020
Notes
^^^^^
* Add note in Installation.rst to start Apache with Locale en_US.UTF-8. This helps to support Umlaut and other characters
in filenames and wkhtml commandline options (like header/footer).
* Migrate documentation from T3 to ReadTheDocs.io - looks older but 'search' is much more better. New: chapters separated
in individual files.
* For the image to PDF feature, installation of `img2pdf` is required (please check :ref:`preparation`).
* Add note in Installation.rst to start Apache with Locale en_US.UTF-8. This helps to support Umlaut and other characters
in filenames and wkhtml commandline options (like header/footer).
* Migrate documentation from T3 to ReadTheDocs.io - looks older but 'search' is much more better. New: chapters separated
in individual files.
* For the image to PDF feature, installation of `img2pdf` is required (please check :ref:`preparation`).
Features
^^^^^^^^
* #10751 / Allow images to be concatenated for PDF download.
* Fontawesome updated 5.13.
* Extend FE.label size to 1023.
* Local documentation rendering directly via Sphinx.
* Manual: Search is working, table width not truncated anymore, PDF & epub export, redirect qfq.io/doc to docs.qfq.io.
* Update copyright notice.
* #10751 / Allow images to be concatenated for PDF download.
* Fontawesome updated 5.13.
* Extend FE.label size to 1023.
* Local documentation rendering directly via Sphinx.
* Manual: Search is working, table width not truncated anymore, PDF & epub export, redirect qfq.io/doc to docs.qfq.io.
* Update copyright notice.
Bug Fixes
^^^^^^^^^
* #10507 / FormElement.type: 'annotate' is defined two times in Enum
* #10705 / New function 'HelperFile::joinPathFilename($pre, $post)'. Joins only if $post is without leading slash.
* #10507 / FormElement.type: 'annotate' is defined two times in Enum
* #10705 / New function 'HelperFile::joinPathFilename($pre, $post)'. Joins only if $post is without leading slash.
Version 20.4.1
......
......@@ -3494,9 +3494,17 @@ Tablesorter View Saver
* `<uniqueName>` should be a name which is unique. Example::
<table {{ 'allperson' AS _tablesorter-view-saver }} class="tablesorter tablesorter-filter tablesorter-column-selector" id="{{pageSlug:T}}-demo"> ... </table>
<table {{ 'allperson' AS _tablesorter-view-saver }} class="tablesorter tablesorter-filter tablesorter-column-selector" id="{{pageSlug:T}}-example"> ... </table>
* 'Views' can be saved as:
.. important::
Always speciy a unique (over your whole T3 installation) HTML ID (`id="{{pageSlug:T}}-example">`). On page load, this
reference will be used to load
the last used settings again. If not specified, and if there are at least two tablesorter without an HTML ID, those
will be mixed and might confuse the whole tablesorter.
* 'Views' can be saved as:
* group: every user will see the `view` and can modify it.
* personal: only the user who created the `view` will see/modify it.
......
......@@ -21,8 +21,8 @@
; you can use in 'conf.py'
project = QFQ - Quick Form Query
version = 23.2
release = 23.2.0
version = 23.3
release = 23.3.1
t3author = Carsten Rose
copyright = since 2017 by the author
......
......@@ -62,9 +62,9 @@ author = 'Carsten Rose, Benjamin Baer'
# built documents.
#
# The short X.Y version.
version = '23.2'
version = '23.3'
# The full version, including alpha/beta/rc tags.
release = '23.2.0'
release = '23.3.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -146,7 +146,7 @@ class Evaluate {
* @throws \UserFormException
* @throws \UserReportException
*/
public function parse($line, $sqlMode = ROW_IMPLODE_ALL, $recursion = 0, &$debugStack = array(), &$foundInStore = '') {
public function parse($line, $sqlMode = ROW_IMPLODE_ALL, $recursion = 0, &$debugStack = array(), &$foundInStore = '', $frCmd = '') {
if ($line === '') {
return '';
......@@ -185,7 +185,7 @@ class Evaluate {
$match = substr($result, $posMatchOpen + $this->startDelimiterLength, $posFirstClose - $posMatchOpen - $this->startDelimiterLength);
$tmpSqlMode = ($posFirstClose == $posLastClose) ? $sqlMode : ROW_IMPLODE_ALL;
$evaluated = $this->substitute($match, $foundInStore, $tmpSqlMode);
$evaluated = $this->substitute($match, $foundInStore, $tmpSqlMode, $frCmd);
// newline
$debugLocal[] = '';
......@@ -215,7 +215,7 @@ class Evaluate {
$evaluated = Support::encryptDoubleCurlyBraces($evaluated);
} else {
if (strpos($evaluated, $this->endDelimiter) !== false) {
$evaluated = $this->parse($evaluated, ROW_IMPLODE_ALL, $recursion + 1, $debugLocal, $foundInStore);
$evaluated = $this->parse($evaluated, ROW_IMPLODE_ALL, $recursion + 1, $debugLocal, $foundInStore, $frCmd);
}
}
}
......@@ -315,7 +315,7 @@ class Evaluate {
* @throws \UserFormException
* @throws \UserReportException
*/
public function substitute($token, &$foundInStore = '', $sqlMode = ROW_IMPLODE_ALL) {
public function substitute($token, &$foundInStore = '', $sqlMode = ROW_IMPLODE_ALL, $frCmd = '') {
$token = trim($token);
$dbIndex = $this->dbIndex;
......@@ -392,7 +392,7 @@ class Evaluate {
}
// create baseUrl attribute for tablesorter api
$baseUrlAttribute = DATA_TABLESORTER_BASE_URL . "='" . $this->store->getVar(SYSTEM_BASE_URL, STORE_SYSTEM) . "'";
return ($this->tablesorter->inlineTablesorterView($arrToken[VAR_INDEX_VALUE], $foundInStore)) . $baseUrlAttribute;
return ($this->tablesorter->inlineTablesorterView($arrToken[VAR_INDEX_VALUE], $foundInStore, $frCmd)) . $baseUrlAttribute;
break;
default:
break;
......
......@@ -44,8 +44,8 @@ class AbstractException extends \Exception {
public $store = null;
protected $file = '';
protected $line = '';
# protected string $file = '';
# protected int $line = 0;
protected $httpStatusCode = '400 Bad Request';
......
......@@ -493,10 +493,16 @@ class Path {
public static function findAbsoluteApp() {
// look for typo3conf directory
$absoluteApp = self::realpath(self::join(__DIR__, '../../../../../../'));
if (!file_exists(self::join($absoluteApp, self::APP_TO_TYPO3_CONF))) {
Thrower::userFormException('App path seems to be wrong: Directory "typo3conf" not found in app path.',
" Current app path: $absoluteApp .",
" In unit tests this can be manually set using Path::setAbsoluteApp() before the path is accessed.");
if (!defined('PHPUNIT_QFQ')) {
if (!file_exists(self::join($absoluteApp, self::APP_TO_TYPO3_CONF))) {
Thrower::userFormException('App path seems to be wrong: Directory "typo3conf" not found in app path.' .
" Current app path: $absoluteApp .",
" In unit tests this can be manually set using Path::setAbsoluteApp() before the path is accessed.");
}
} else {
//TODO: CR: Keine Idee ob das hier Sinn macht
Path::setAbsoluteApp('typo3conf');
}
self::setAbsoluteApp($absoluteApp);
}
......
......@@ -807,7 +807,7 @@ class Support {
*/
public static function mergeUrlComponents($host, $hostOrPath, $query) {
$url = '';
$pageSlug = '';
if ($host != '' && substr($host, -1, 1) != '/') {
$host .= '/';
......@@ -823,17 +823,33 @@ class Support {
if (substr($query, 0, 9) == 'index.php') {
$query = substr($query, 9);
} else if (!defined('PHPUNIT_QFQ')) { //ToDo adjust unit test for t3 v10
$countHost = strlen($url);
$queryTmp = substr($query, $countHost);
$pageSlug = explode('?', $queryTmp, 2);
$pageSlug = $pageSlug[0] ?? '';
if (!empty($pageSlug)) {
$pageSlugCount = strlen($pageSlug);
$finalCount = strlen($url) + $pageSlugCount;
$query = substr($query, $finalCount);
}
}
//T3 v10 link is constructed differently
if (false !== strpos(substr($query, 1), '?')) {
throw new \CodeException('Found a "?" after the beginning of the query - this is forbidden', ERROR_BROKEN_PARAMETER);
}
if ($query != '') {
$url = $url . '?' . $query;
$url = str_replace('??', '?', $url);
if(T3Handler::typo3VersionGreaterEqual10()){
$url = $url . $pageSlug . '?' . $query;
}else{
$url = $url . '?' . $query;
}
$url = str_replace('??', '?', $url );
}
//Variante 1(T3 < v10): index.php?s=wt5reit45itt
//Variante 2(T3 >= v10): ?s=grksan40nag04n
return $url;
}
......
......@@ -595,7 +595,7 @@ class Report {
$this->doQfqFunction($this->frArray[$fullLevel . "." . TOKEN_FUNCTION]);
}
$sql = $this->variables->doVariables($this->frArray[$fullLevel . "." . TOKEN_SQL]);
$sql = $this->variables->doVariables($this->frArray[$fullLevel . "." . TOKEN_SQL], TOKEN_SQL);
$this->store->setVar(SYSTEM_SQL_FINAL, $sql, STORE_SYSTEM);
......
......@@ -56,7 +56,7 @@ class Tablesorter {
* @throws \UserFormException
* @throws \UserReportException
*/
public function inlineTablesorterView($token, &$foundInStore) {
public function inlineTablesorterView($token, &$foundInStore, $frCmd = '') {
$token = OnString::trimQuote($token);
if (empty($token)) {
......@@ -74,6 +74,11 @@ class Tablesorter {
$s = $this->link->renderLink('U:' . SETTING_TABLESORTER_TABLE_ID . '=' . $token . '&' . SETTING_TABLESORTER_FE_USER . '=' . $feUser . '|s|r:8');
$view = $this->getTableViewAsJson($token, $feUser);
// Improve twig compatibility with escaped double quotes
if ($frCmd === TOKEN_SQL) {
$view = addslashes($view);
}
// data-tablesorter-sip='badcaffee1234' data-tablesorter-view='....'
return "data-tablesorter-id='" . $token . "' " . DATA_TABLESORTER_SIP . "='" . $s . "' " . DATA_TABLESORTER_VIEW . "='" . $view . "' ";
}
......
......@@ -68,7 +68,7 @@ class Variables {
* @throws \UserFormException
* @throws \UserReportException
*/
public function doVariables($text) {
public function doVariables($text, $frCmd = '') {
if ($text == '') {
return '';
......@@ -81,7 +81,7 @@ class Variables {
$str = preg_replace_callback('/{{\s*(([0-9]+.)+[a-zA-Z0-9_.]+)(:[a-zA-Z-]*)*\s*}}/', 'self::replaceVariables', $text);
// Try the Stores
return $this->eval->parse($str);
return $this->eval->parse($str, null, null, $dummyStack, $dummyStore, $frCmd);
}
/**
......
......@@ -135,6 +135,10 @@ class Config {
$updateT3QfqConfig = true; // Legacy behaviour.
}
if (defined('PHPUNIT_QFQ')) {
$config[SYSTEM_BASE_URL] = $baseUrl = HTTP_EXAMPLE_COM;
}
$config = self::renameConfigElements($config);
$config = self::setDefaults($config);
self::checkDeprecated($config);
......
......@@ -38,6 +38,7 @@
Release
=======
Version 23.x.x
--------------
......@@ -52,6 +53,48 @@ Features
Bug Fixes
^^^^^^^^^
Version 23.3.1
--------------
Date: 31.03.2023
Bug Fixes
^^^^^^^^^
* #15920 / QFQ variable evaluation broken: wrong variable name
Version 23.3.0
--------------
Date: 30.03.2023
Features
^^^^^^^^
* #15491 / Search refactor redesign and T3 V10 compatiblity: underscore character, counter fixed, page alias and slug handling.
* #15529 / Form/subrecord: Design Titel / Box.
* #15570 / Changed DB handling in class FormAction. Fixed multi-db problem with this. Included change for check of
existing form editor report.
* #15579 / Ability for searching all possible characters, includes not replaced QFQ variables.
* #15627 / Added character count and maxLength feature for TinyMCE.
* Add various icons to documentation.
* Doc Form.rst: reference 'orderColumn'.
* Doc Report.rst: fix typo, add icons, improved example for tablesorter.
* Add indexes for table FormSubmitLog.
* FormEditor: Show Tablename in pill 'table definition'.
* FormEditor: FE subrecord > show container id below name.
Bug Fixes
^^^^^^^^^
* #14754 / Using double quotes in tableview config caused sql error.
* #15483 / Protected folder check fixed. Changed default of wget, preventing errors. Changed handling from protected
folder check, new once a day.
* #15521 / FormEditor assigns always container, even none is selected. Change handling of form variables from type select,
radio and checkbox. Expected 0 from client request instead of empty string.
* #15523 / Search/Refactor broken for Multi-DB.
* #15626 / Multi-DB: FormEditor save error.
Version 23.2.0
--------------
......@@ -67,18 +110,19 @@ Notes
Features
^^^^^^^^
* 7650 / For FormElement which are required: `indicateRequired=0|1` show or hide the 'required asterix'.
* 10013 / FormEditor: Several textarea inputs changed to 'editor' incl. SQL syntax highlighting.
* 14995 / Support for refactoring: search in QFQ Form/FormElement and Typo3 pages/tt-content tables.
* QMANR: SQL prepared function to format Swiss Matrikelnumbers
* #7650 / For FormElement which are required: `indicateRequired=0|1` show or hide the 'required asterix'.
* #10013 / FormEditor: Several textarea inputs changed to 'editor' incl. SQL syntax highlighting.
* #14995 / Support for refactoring: search in QFQ Form/FormElement and Typo3 pages/tt-content tables.
* QMANR: SQL prepared function to format Swiss Matrikelnumbers
Bug Fixes
^^^^^^^^^
* 8668 / Fix that if a pill becomes disabled, child FE should not respected during save.
* 15168 / Fixed language form save problem for t3 v >= 9.
* 15420 / TypeAhead Prefetch triggers 'form changed' after save.
* 15482 / Added missing password font file.
* #7899 / Fe.type=password / retype / required: always complain about missing value - bug has been fixed earlier.
* #8668 / Fix that if a pill becomes disabled, child FE should not respected during save.
* #15168 / Fixed language form save problem for t3 v >= 9.
* #15420 / TypeAhead Prefetch triggers 'form changed' after save.
* #15482 / Added missing password font file.
Version 23.1.1
......@@ -94,19 +138,19 @@ Notes
Features
^^^^^^^^
* #11980 / check protected folder for access from outside after new qfq installation or update.
* #13566 / Cleanup: Delete config-example.qfq.php
* #15053 / New dynamic QFQ config option: fillStoreSystemBySqlRow.
* Update SANITIZE_ALLOW_EMAIL_MESSAGE to be more generic: 'Invalid email format'
* Update Documentation/Form.rst: Added QFQ Function QMANR(manr), broken ref to restAuthorization, fixed typos.
* Update copyright year
* #11980 / check protected folder for access from outside after new qfq installation or update.
* #13566 / Cleanup: Delete config-example.qfq.php
* #15053 / New dynamic QFQ config option: fillStoreSystemBySqlRow.
* Update SANITIZE_ALLOW_EMAIL_MESSAGE to be more generic: 'Invalid email format'
* Update Documentation/Form.rst: Added QFQ Function QMANR(manr), broken ref to restAuthorization, fixed typos.
* Update copyright year
Bug Fixes
^^^^^^^^^
* #2665 / Fixed not working dynamic update with tinymce and codemirror. Improved frontend edit visualization, elements in window will be resized automatically.
* #11517 / Fixed Bug not showing extraInfoButton on certain FormElements like: TextArea, Select, Checkbox, Radio, Upload, Editor.
* #12066 / Form: Enter as submit forward not working.
* #2665 / Fixed not working dynamic update with tinymce and codemirror. Improved frontend edit visualization, elements in window will be resized automatically.
* #11517 / Fixed Bug not showing extraInfoButton on certain FormElements like: TextArea, Select, Checkbox, Radio, Upload, Editor.
* #12066 / Form: Enter as submit forward not working.
Version 23.1.0
--------------
......@@ -116,25 +160,25 @@ Date: 05.01.2023
Features
^^^^^^^^
* #6250 / Enhance layout subrecord.
* #10003 / Fieldset: stronger visualize group.
* #15036 / FormElement subrecord summary additional row(s).
* #15154 / FormElement input check via regexp: trim whitespace before regexp.
* #6250 / Enhance layout subrecord.
* #10003 / Fieldset: stronger visualize group.
* #15036 / FormElement subrecord summary additional row(s).
* #15154 / FormElement input check via regexp: trim whitespace before regexp.
Bug Fixes
^^^^^^^^^
* #14305 / Bug "No form found with this id".
* #14997 / Tablesorter: Filter value shown but no effect after 'Browser Back'
* #15191 / Broken datepicker in template group.
* #15214 / Inline report save history.
* #15229 / Typeahead and qfq-clear-me will be initialized after adding new fields.
* #15230 / Set own button class for dropdown.
* #15314 / FE & BE Email now filled in 'sipForTypo3Vars' and therefore available in API calls.
* #15316 / config.baseUrl might be overwritten if no scheme or multiple urls are given.
* Doc: Fix missing ! in doc: sqlValidate. Fix index undefined htmlAllow. Fix filemtime() Warning.
* Fixed date to datetime convert bug.
* Fixed error coming from typeahead when array is empty.
* #14305 / Bug "No form found with this id".
* #14997 / Tablesorter: Filter value shown but no effect after 'Browser Back'
* #15191 / Broken datepicker in template group.
* #15214 / Inline report save history.
* #15229 / Typeahead and qfq-clear-me will be initialized after adding new fields.
* #15230 / Set own button class for dropdown.
* #15314 / FE & BE Email now filled in 'sipForTypo3Vars' and therefore available in API calls.
* #15316 / config.baseUrl might be overwritten if no scheme or multiple urls are given.
* Doc: Fix missing ! in doc: sqlValidate. Fix index undefined htmlAllow. Fix filemtime() Warning.
* Fixed date to datetime convert bug.
* Fixed error coming from typeahead when array is empty.
Version 22.12.1
......@@ -152,21 +196,21 @@ Notes
Features
^^^^^^^^
* #5715 / Caching for on the fly rendred files (PDF, Excel, ZIP).
* #6250 / Enhance form layout: a) Subrecord, b) Subrecord-Title
* #9927 / Do QFQ Update (config, table defintion) only if there is a BE user logged in the current session.
* #12503 / Detect likely unwanted UPDATE statement with missing WHERE.
* New Button Sizes: btn-tiny, btn-small
* #5715 / Caching for on the fly rendred files (PDF, Excel, ZIP).
* #6250 / Enhance form layout: a) Subrecord, b) Subrecord-Title
* #9927 / Do QFQ Update (config, table defintion) only if there is a BE user logged in the current session.
* #12503 / Detect likely unwanted UPDATE statement with missing WHERE.
* New Button Sizes: btn-tiny, btn-small
Bug Fixes
^^^^^^^^^
* #14305 / Inline Report edit saves history to Typo 3.
* #14506 / Tablesorter: after form close, already defined filter criteria in tablesorter will be applied.
* #15188 / Clean up config to T3 parameter.
* #15193 / No form found with this id error in MultiDB Setup.
* #15206 / Form Save: Internal Error in MultiDB Setup.
* Fix Doc: latest CCS/JS includes.
* #14305 / Inline Report edit saves history to Typo 3.
* #14506 / Tablesorter: after form close, already defined filter criteria in tablesorter will be applied.
* #15188 / Clean up config to T3 parameter.
* #15193 / No form found with this id error in MultiDB Setup.
* #15206 / Form Save: Internal Error in MultiDB Setup.
* Fix Doc: latest CCS/JS includes.
Version 22.12.0
---------------
......@@ -237,11 +281,11 @@ Features
Bug Fixes
^^^^^^^^^
* #11325 / SQL CALL() - insert() and select() should be supported now.
* #14622 / FormElement `unexpected error` on save.
* #15005 / TypeAhead Dynamic Update Mode Hidden to Required
* #15014 / Excel import broken if multiple regions defined.
* #15048 / STORE_USER broken.
* #11325 / SQL CALL() - insert() and select() should be supported now.
* #14622 / FormElement `unexpected error` on save.
* #15005 / TypeAhead Dynamic Update Mode Hidden to Required
* #15014 / Excel import broken if multiple regions defined.
* #15048 / STORE_USER broken.
Version 22.10.1
---------------
......@@ -251,29 +295,29 @@ Date: 24.10.2022
Notes
^^^^^
* Migration of existing Typo3 V9 to V10: Check #12584, #12440
* Migration of existing Typo3 V9 to V10: Check #12584, #12440
Features
^^^^^^^^
* #12584, #12440 / Typo3 V10 Migration Script Replace Alias Patterns
* #14738 / Datetimepicker: verify various setups
* #14802 / DateTime own class and unit tests
* Add doc to table vertical column via CSS,
* Add qfq-badge-* to doc
* #12584, #12440 / Typo3 V10 Migration Script Replace Alias Patterns
* #14738 / Datetimepicker: verify various setups
* #14802 / DateTime own class and unit tests
* Add doc to table vertical column via CSS,
* Add qfq-badge-* to doc
Bug Fixes
^^^^^^^^^
* #14618 / Changed logic behind getting first value from array (check for typeahead array was already given but was
placed after the checkForEncryptedValue function). No exception possible. Function name changed to generic. Added new
function is_multi_array to check if array is multidimensional and return true or false.
* #14736 / Datetimepicker: FormElement.parameter.dateFormat - required.
* #14755 / Fix for typeahead problem in t3 v9 and higher. Typeahead url will be setup same as save.php. Results to an absolute path.
* #14813 / Report: dbIndex - missing per level definition
* #14844 / Fixed bug of no working dynamic update and empty output in Form Store with Datetimepicker.
* #14857 / String expected, array given.
* #14885 / Fabric zoom problem.
* #14618 / Changed logic behind getting first value from array (check for typeahead array was already given but was
placed after the checkForEncryptedValue function). No exception possible. Function name changed to generic. Added new
function is_multi_array to check if array is multidimensional and return true or false.
* #14736 / Datetimepicker: FormElement.parameter.dateFormat - required.
* #14755 / Fix for typeahead problem in t3 v9 and higher. Typeahead url will be setup same as save.php. Results to an absolute path.
* #14813 / Report: dbIndex - missing per level definition
* #14844 / Fixed bug of no working dynamic update and empty output in Form Store with Datetimepicker.
* #14857 / String expected, array given.
* #14885 / Fabric zoom problem.
......@@ -285,26 +329,26 @@ Date: 04.10.2022
Notes
^^^^^
* TinyMCE Feature "upload images via drag'n'drop" now supported.
* TinyMCE Feature "upload images via drag'n'drop" now supported.
Features
^^^^^^^^
* #14813 / Report: dbIndex - missing per level definition
* #12474 / Check BaseConfigURL if it is given and the the last char is '/'
* #12452 / baseUrl: add automatically '/' at end
* #10782 / Tiny MCE: Image Upload & Image drag'n'drop
* #14813 / Report: dbIndex - missing per level definition
* #12474 / Check BaseConfigURL if it is given and the the last char is '/'
* #12452 / baseUrl: add automatically '/' at end
* #10782 / Tiny MCE: Image Upload & Image drag'n'drop
Bug Fixes
^^^^^^^^^
* #14803 / MultiDB (different DB hosts): broken 'show table definition' in FormEditor -
* #14791 / datetimepicker: undefined index: timeParts[2]
* #14619 / Added note to missed bug fix.
* #12630 / Added code commentary. Reformatted code. getUniqueFileName function changed. New logFileMessages implemented.
* #14463 / llow statusbar (resize button included) to show as default.
* #14455 / Drag and drop triggers record lock.
* #13818 / htmlspecialchars_decode() - expects parameter 1 to be string, array given
* #14803 / MultiDB (different DB hosts): broken 'show table definition' in FormEditor -
* #14791 / datetimepicker: undefined index: timeParts[2]
* #14619 / Added note to missed bug fix.
* #12630 / Added code commentary. Reformatted code. getUniqueFileName function changed. New logFileMessages implemented.
* #14463 / llow statusbar (resize button included) to show as default.
* #14455 / Drag and drop triggers record lock.
* #13818 / htmlspecialchars_decode() - expects parameter 1 to be string, array given
Version 22.9.2
--------------
......@@ -314,13 +358,13 @@ Date: 22.09.2022
Features
^^^^^^^^
* #12630 / dateTimePicker refactored. Mode: 'qfq', 'browser', 'no'. Default: 'qfq'
* Add release notes to update UZH CD to latest version and to remove QFQ JS/CSS includes from custom typoscript template.
* #12630 / dateTimePicker refactored. Mode: 'qfq', 'browser', 'no'. Default: 'qfq'
* Add release notes to update UZH CD to latest version and to remove QFQ JS/CSS includes from custom typoscript template.
Bug Fixes
^^^^^^^^^
* #14619 / dateTimePicher: missing popup on first click, record not dirty
* #14619 / dateTimePicher: missing popup on first click, record not dirty
Version 22.9.1
--------------
......@@ -528,7 +572,7 @@ Bug Fixes
* #3446 / Unknown permission mode: 'logged_in'
* #9268 / SELECT with outer brackets not recognized as SELECT
* #13030 / Max length cuts - line endings \r\n has been counted as two chars. During input they are counted as 1 and
therefore on data load the string has been cutted.
therefore on data load the string has been cutted.
* #13139 / Tablesorter: some elements are in front of a sticky title row
* #13507 / QFQ function should work without 'sql='
* #13525 / makefile adjusted for multiple users
......@@ -810,8 +854,8 @@ Date: 25.06.2020
Bug Fixes
^^^^^^^^^
* #10641 / TypeAheadTag: Fehler beim gleichzeitigen anlegen mehrerer neuer Tags
* #10794 / Documentation: Crontab entry more clearly
* #10641 / TypeAheadTag: Fehler beim gleichzeitigen anlegen mehrerer neuer Tags
* #10794 / Documentation: Crontab entry more clearly
Version 20.6.1
......@@ -833,27 +877,27 @@ Date: 14.06.2020
Notes
^^^^^
* Add note in Installation.rst to start Apache with Locale en_US.UTF-8. This helps to support Umlaut and other characters
in filenames and wkhtml commandline options (like header/footer).
* Migrate documentation from T3 to ReadTheDocs.io - looks older but 'search' is much more better. New: chapters separated
in individual files.
* For the image to PDF feature, installation of `img2pdf` is required (please check :ref:`preparation`).
* Add note in Installation.rst to start Apache with Locale en_US.UTF-8. This helps to support Umlaut and other characters
in filenames and wkhtml commandline options (like header/footer).
* Migrate documentation from T3 to ReadTheDocs.io - looks older but 'search' is much more better. New: chapters separated
in individual files.
* For the image to PDF feature, installation of `img2pdf` is required (please check :ref:`preparation`).
Features
^^^^^^^^
* #10751 / Allow images to be concatenated for PDF download.
* Fontawesome updated 5.13.
* Extend FE.label size to 1023.
* Local documentation rendering directly via Sphinx.
* Manual: Search is working, table width not truncated anymore, PDF & epub export, redirect qfq.io/doc to docs.qfq.io.
* Update copyright notice.
* #10751 / Allow images to be concatenated for PDF download.
* Fontawesome updated 5.13.
* Extend FE.label size to 1023.
* Local documentation rendering directly via Sphinx.
* Manual: Search is working, table width not truncated anymore, PDF & epub export, redirect qfq.io/doc to docs.qfq.io.
* Update copyright notice.
Bug Fixes
^^^^^^^^^
* #10507 / FormElement.type: 'annotate' is defined two times in Enum
* #10705 / New function 'HelperFile::joinPathFilename($pre, $post)'. Joins only if $post is without leading slash.
* #10507 / FormElement.type: 'annotate' is defined two times in Enum
* #10705 / New function 'HelperFile::joinPathFilename($pre, $post)'. Joins only if $post is without leading slash.
Version 20.4.1
......
# QFQ Tests
## PhpUnit
### Run unit tests from CLI:
Make sure dev dependencies are installed:
```shell script
# in extension directory
composer update --dev
```
Run all tests:
```shell script
# in extension directory
vendor/bin/phpunit --configuration phpunit.xml
```
Run single test:
```shell script
# in extension directory
vendor/bin/phpunit --configuration phpunit.xml --filter <test_name>
```
Please check: Documentation-develop/PHPUNIT.md
\ No newline at end of file
......@@ -16,7 +16,7 @@ use PHPUnit\Framework\TestCase;
* Class BodytextParserTest
* @package qfq
*/
class BodytextParserTest extends TestCase {
final class BodytextParserTest extends TestCase {
public function testProcessPlain() {
$btp = new BodytextParser();
......@@ -350,23 +350,24 @@ EOF;
}
/**
* @expectedException \UserFormException
*
*/
public function testProcessExceptionClose() {
$btp = new BodytextParser();
$this->expectException(\UserFormException::class);
// Nested: unmatched close bracket
$btp->process("10.sql = SELECT 'Hello World'\n } \n30.sql = SELECT 'Hello World'\n");
}
/**
* @expectedException \UserFormException
*
*/
public function testProcessExceptionOpen() {
$btp = new BodytextParser();
$this->expectException(\UserFormException::class);
// Nested: unmatched open bracket
$btp->process("10.sql = SELECT 'Hello World'\n20 { \n30.sql = SELECT 'Hello World'\n");
......
......@@ -6,8 +6,6 @@
namespace IMATHUZH\Qfq\Tests\Unit\Core;
use IMATHUZH\Qfq\Core\BuildFormPlain;
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Helper\Support;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Tests\Unit\Core\Database\AbstractDatabaseTest;
......@@ -42,7 +40,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
$build = new BuildFormPlain([F_DB_INDEX => DB_INDEX_DEFAULT], array(), array(), $this->dbArray);
$formId1 = $build->getFormId();
$this->assertRegExp('/qfq-form-[0-9a-f]{13}/', $formId1);
$this->assertMatchesRegularExpression('/qfq-form-[0-9a-f]{13}/', $formId1);
$formId2 = $build->getFormId();
$this->assertEquals($formId1, $formId2);
......@@ -478,14 +476,20 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
$result = $build->buildSubrecord($formElement, 'name:1', '', $json);
$this->assertEquals('<table class="' . SUBRECORD_TABLE_CLASS_DEFAULT . '" id="123-123" ><caption class="qfq-subrecord-title">Name</caption><thead><tr><th>Name</th></tr></thead><tbody ><tr class="record" ><td><b>Doe</b></td></tr><tr class="record" ><td><b>Smith</b></td></tr></tbody></table>', $result);
// _id: 1, icon: bullet-green.gif
$formElement['sql1'] = $this->dbArray[DB_INDEX_DEFAULT]->sql('SELECT id AS "_id", "bullet-green.gif" AS "Status|icon" FROM Person ORDER BY id LIMIT 2');
$result = $build->buildSubrecord($formElement, 'name:1', '', $json);
// For unknown reason: $baseUrl is empty here when run on gitlab runner
if (($this->baseUrl ?? '') == '') {
$this->baseUrl = HTTP_EXAMPLE_COM;
}
// _id: 1, icon: bullet-green.gif
$formElement['sql1'] = $this->dbArray[DB_INDEX_DEFAULT]->sql('SELECT id AS "_id", "bullet-green.gif" AS "Status|icon" FROM Person ORDER BY id LIMIT 2');
$result = $build->buildSubrecord($formElement, 'name:1', '', $json);
$expected = '<table class="' . SUBRECORD_TABLE_CLASS_DEFAULT . '" id="123-123" ><caption class="qfq-subrecord-title">Name</caption><thead><tr><th>Status</th></tr></thead><tbody ><tr class="record" ><td><image src=\'' . $this->baseUrl . 'typo3conf/ext/qfq/Resources/Public/icons/bullet-green.gif\'></td></tr><tr class="record" ><td><image src=\'' . $this->baseUrl . 'typo3conf/ext/qfq/Resources/Public/icons/bullet-green.gif\'></td></tr></tbody></table>';
$baseUrl = $this->baseUrl;
// $baseUrl = 'http://failed.to.set.baseUrl/';
// $baseUrl = 'http://example.com/';
$expected = '<table class="' . SUBRECORD_TABLE_CLASS_DEFAULT . '" id="123-123" ><caption class="qfq-subrecord-title">Name</caption><thead><tr><th>Status</th></tr></thead><tbody ><tr class="record" ><td><image src=\'' . $baseUrl . 'typo3conf/ext/qfq/Resources/Public/icons/bullet-green.gif\'></td></tr><tr class="record" ><td><image src=\'' . $baseUrl . 'typo3conf/ext/qfq/Resources/Public/icons/bullet-green.gif\'></td></tr></tbody></table>';
$this->assertEquals($expected, $result);
// _id: 1, mailto: john@doe.com
......@@ -521,7 +525,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
// _id: 1, name: Doe, link
$formElement['sql1'] = $this->dbArray[DB_INDEX_DEFAULT]->sql('SELECT id AS "_id", name, CONCAT("s:1|p:form&form=person&r=" , id , "|t:", name) AS "link" FROM Person ORDER BY id LIMIT 2');
$result = $build->buildSubrecord($formElement, 'name:1', '', $json);
$this->assertEquals('<table class="' . SUBRECORD_TABLE_CLASS_DEFAULT . '" id="123-123" ><caption class="qfq-subrecord-title">Name</caption><thead><tr><th>name</th><th></th></tr></thead><tbody ><tr class="record" ><td>Doe</td><td><a href="' . $this->baseUrl . 'form?s=badcaffee1234" >Doe</a></td></tr><tr class="record" ><td>Smith</td><td><a href="' . $this->baseUrl . 'form?s=badcaffee1234" >Smith</a></td></tr></tbody></table>', $result);
$this->assertEquals('<table class="' . SUBRECORD_TABLE_CLASS_DEFAULT . '" id="123-123" ><caption class="qfq-subrecord-title">Name</caption><thead><tr><th>name</th><th></th></tr></thead><tbody ><tr class="record" ><td>Doe</td><td><a href="' . $baseUrl . 'form?s=badcaffee1234" >Doe</a></td></tr><tr class="record" ><td>Smith</td><td><a href="' . $baseUrl . 'form?s=badcaffee1234" >Smith</a></td></tr></tbody></table>', $result);
}
/**
......@@ -601,7 +605,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
/**
*
*/
protected function setUp() {
protected function setUp(): void {
$_GET['form'] = 'phpunit_person';
......