Code: ``SELECT 'p:{{pageAlias}}&form=person&r=1&formModeGlobal=readquiredOff|s|t:View|s|b' AS _link``
Code: ``SELECT 'p:{{pageSlug}}?form=person&r=1&formModeGlobal=readquiredOff|s|t:View|s|b' AS _link``
* A form has one or more FormElement with 'fe.type=required'.
* Calling the form with `formModeGlobal=requiredOff` will allow the user to save the form, even if not all
...
...
@@ -1859,7 +1859,7 @@ will be rendered inside the form as a HTML table.
* *FormElement.parameter*
* *form* = `<form name>` - Target form, e.g. *form=person*
* *page* = `<T3 page alias or id>` - Target page with detail form. If none specified, use the current page.
* *page* = `<T3 slug>` - Target page with detail form. If none specified, use the current page.
* *extraDeleteForm*: Optional. The per row delete Button will reference the form specified here (for deleting) instead of the default (*form*).
* *detail* = `<string>` - Mapping of values from
...
...
@@ -2536,7 +2536,7 @@ Example: A slave record (e.g. an address of a person) has to be assigned to a ma
``person.id=address.pId``. Just give the `pId` in the link who calls the address form. The following creates a 'new'
button for an address for all persons, and the pId will be automatically saved in the address table: ::
SELECT CONCAT('p:{{pageAlias:T}}&form=address&r=0&pId=', p.id) AS _pagen FROM Person AS p
SELECT CONCAT('p:{{pageSlug:T}}?form=address&r=0&pId=', p.id) AS _pagen FROM Person AS p
Remember: it's a good practice to specify such parameter in Form.permitNew and/or Form.permitEdit. It's only a check for
the webmaster, not to forgot a parameter in a SIP url.
...
...
@@ -3033,7 +3033,7 @@ in 'detail' or 'list' mode. Create a single QFQ tt-content record on a fresh pag
form = {{form:SE}}
10.sql = SELECT p.name, CONCAT('p:{{pageAlias:T}}&form=Person&r=', p.id) AS _pagee FROM Person AS p
10.sql = SELECT p.name, CONCAT('p:{{pageSlug:T}}?form=Person&r=', p.id) AS _pagee FROM Person AS p
10.rend = <br>
* If the page is called without any parameter, a list of persons is shown.
...
...
@@ -3104,12 +3104,12 @@ QFQ content record::
# Creates a small form that redirects back to this page
10 {
sql = SELECT '_'
head = <formaction='#'method='get'><inputtype='hidden'name='id'value='{{pageAlias:T}}'>Search: <inputtype='text'name='search'value='{{search:CE:all}}'><inputtype='submit'value='Submit'></form>
head = <formaction='#'method='get'><inputtype='hidden'name='id'value='{{pageSlug:T}}'>Search: <inputtype='text'name='search'value='{{search:CE:all}}'><inputtype='submit'value='Submit'></form>
}
# SQL statement will find and list all the relevant forms - be careful not to open a cross site scripting door: the parameter 'search' needs to be sanitized.
20 {
sql = SELECT CONCAT('p:{{pageAlias:T}}&form=form&r=', f.id) AS _pagee, f.id, f.name, f.title
sql = SELECT CONCAT('p:{{pageSlug:T}}?form=form&r=', f.id) AS _pagee, f.id, f.name, f.title
FROM Form AS f
WHERE f.name LIKE '%{{search:CE:alnumx}}%'
head = <tableclass='table'>
...
...
@@ -3602,7 +3602,7 @@ Installation:
* Insert a link/button 'Copy form from ExtForm' to open the import/merge form. A good place is the list of all forms (see :ref:`form-editor`).
E.g.: ::
10.head = {{'b|p:id={{pageAlias:T}}&form=copyFormFromExt|t:Copy form from ExtForm' AS _link }} ...
10.head = {{'b|p:{{pageSlug:T}}?form=copyFormFromExt|t:Copy form from ExtForm' AS _link }} ...
If there are several T3/QFQ instances and if forms should be imported frequently/easily, set up a one shot
To define a typeahead list of T3 page alias names::
To define a typeahead list of T3 page slug names::
FE.type = text
FE.parameter.typeAheadSql = SELECT p.alias FROM {{dbNameT3:Y}}.Pages AS p WHERE p.deleted=0 AND p.alias!='' AND p.alias LIKE ? ORDER BY p.alias LIMIT 20
FE.parameter.typeAheadSql = SELECT p.slug FROM {{dbNameT3:Y}}.Pages AS p WHERE p.deleted=0 AND p.slug!='' AND p.slug LIKE ? ORDER BY p.slug LIMIT 20
Version 21.x.x vvvvvvvvvvvvvvvvv THERE ARE ALREADY RELEASE NOTES FOR THE NEXT VERSION, SEE BELOW!
--------------
Date: <date>
...
...
@@ -52,6 +52,53 @@ Features
Bug Fixes
^^^^^^^^^
Version 21.x.x <<<<<<<<<<<<<<<<<<<<<< NEXT VERSION
--------------
Date: <date>
Notes
^^^^^
* Typo3 v9 uses url paths instead of page ids for urls. e.g. "/home" instead of "home/index.php?id=home"
* The Typo3 pages do not have the alias property anymore.
* QFQ used to generate links of the form "index.php?id=home&...". Those don't work anymore.
* QFQ now generates qfq links using the page slug. e.g. "p:/some/page?foo=bar" AS _link generates a link with url "https://mydomain.com/some/page?foo=bar".
* A page slug always starts with a slash "/" and QFQ expects that slash to be there.
* Every existing QFQ link has to be adjusted to the new format using slugs instead of page id or alias.
* QFQ shows an automatic detection and migration dialog to help with fixing all broken links.
* After the migration dialog has been deactivated it can be reactivated by setting the variable FORCE_RUN_PAGE_SLUG_MIGRATION_CHECK to true in filedamin/protected/qfqProject/conf/qfq.json
* For the new links to work properly the base Url has to be configured in the QFQ Typo3 settings.
* Please follow these practices:
* Use {{pageSlug:T}} instead of {{pageAlias:T}} or {{pageId:T}} in the _link columns. E.g. "p:{{pageSlug}}?foo=bar" AS link .
* Note: "&" after alias should be replaced by "?" after slug in _link p: value.
* Use {{baseUrlLang:Y}}/{{pageSlug:T}} instead of {{pageAlias:T}} or {{pageId:T}} in hardcoded <a> tags. E.g. href="{{baseUrlLang:Y}}/{{pageSlug:T}}?foo=bar" .
* Replace hardcoded aliases in QFQ code with the slugs of the pages. E.g. "p:/some/page?foo=bar" AS _link
* Hint: Typo3 replaces "_" with "-" when converting an alias to a slug during the Typo3 version 9 upgrade.
* Replace the "U:" token with "p:" for all sepecial columns except _paged. I.e. "U: ... &id=[alias]& ... " becomes "p:[slug]? ... ".
Features
^^^^^^^^
* {{pageSlug:T}} holds the slug of the current page. (Typo3 v9 and up)
* The "p:.." token now takes page slugs instead of alias everywhere. (Typo3 v9 and up)
* provide dialog for the developer to migrate from page alias to page slug. (Typo3 v9 and up)
Bug Fixes
^^^^^^^^^
Deprecated
^^^^^^^^^^
* The usage of {{pageAlias:T}} will produce an exception. (Typo3 v9 and up)
"parameter": "slaveId={{SELECT fe.uid FROM {{dbNameT3:Y}}.fe_users AS fe WHERE fe.username='{{email:RE}}' AND fe.username!='' AND fe.deleted=0 LIMIT 1}}\r\n\r\n# Create FE User. Please update values of `pid`, `usergroup` to your setup.\r\nsqlInsert = {{INSERT INTO {{dbNameT3:Y}}.fe_users ( `pid`, `usergroup`, `username`, `email`, `name`, `password`,`crdate`) VALUES ( 5 , 1 , '{{email:RE}}', '{{email:RE}}', '{{lastName:RE}}, {{firstName:RE}}', '{{myValue:FE:all:p}}', UNIX_TIMESTAMP() ) }}\r\n\r\nsqlUpdate = {{UPDATE {{dbNameT3:Y}}.fe_users SET password='{{myValue:FE:all:p}}' WHERE uid={{slaveId:V0}} }}\r\n\r\nsqlAfter={{UPDATE Person SET authExpire=0 WHERE id={{id:R}} }}"
.'Usages of page alias found. The Typo3 feature "page alias" has been replaced by the "page slug" feature and can no longer be used in links with "?id=[alias]".'
.'<h2>SOLUTION</h2>'
."<ul>"
.'<li>The special column _link now treats the "p:" parameter value as a page slug.</li>'
.'<li>Use {{pageSlug:T}} instead of {{pageAlias:T}} or {{pageId:T}} in the _link columns.</li>'
.'<li>Use {{baseUrlLang:Y}}/{{pageSlug:T}} instead of {{pageAlias:T}} or {{pageId:T}} in hardcoded '.htmlentities("<a>").' tags.</li>'
.'<li>Replace hardcoded aliases in QFQ code with the slugs of the pages.</li>'
.'<li>Replace "U: ... &id=[alias]& ... " with "p:[slug]? ... " for all sepecial columns except _paged.</li>'
.'<li>The special colums such as "_link" now treat the "p:" parameter value as a page slug.</li>'
.'<li>Use {{pageSlug:T}} instead of {{pageAlias:T}} or {{pageId:T}} in the _link columns. E.g. "p:{{pageSlug}}?foo=bar" AS link .</li>'
.'<li>Use {{baseUrlLang:Y}}/{{pageSlug:T}} instead of {{pageAlias:T}} or {{pageId:T}} in hardcoded '.htmlentities("<a>").' tags. E.g. href="{{baseUrlLang:Y}}/{{pageSlug:T}}?foo=bar".</li>'
.'<li>Replace hardcoded aliases in QFQ code with the slugs of the pages. E.g. "p:/some/page?foo=bar" AS _link.</li>'
.'<li>Replace "U: ... &id=[alias]& ... " with "p:[slug]? ... " for all sepecial columns except _paged. I.e. "U: ... &id=[alias]& ... " becomes "p:[slug]? ... ". </li>'
.'<li>Hint: Typo3 replaces "_" with "-" when converting an alias to a slug during the Typo3 version 9 upgrade.</li>'
.'<li>Hint: A page slug always starts with a slash "/" and QFQ expects the slash to be there.</li>'
.'<li>Note: After the page slug comes a "?" not a "&". E.g. "p:/some/page?foo=bar" AS _link. </li>'