#93877pidInList keyword 'this' not working when CE is referenced via CType = shortcut because it points to the page of the shortcut CE and not to the page of the referenced CE
Description
Consider a CE that fetches inline records with a DatabaseQueryProcessor. Since the records are on the same page as the CE itself, for pidInList the default this is correct.
If this CE is now referenced in CType shortcut the inline records are not fetched because this uses the pid of the shortcut element, not from the referenced record. You have to explcitly state pidInList.field = pid which makes the this keyword essentially useless (because you can never use it because under normal circumstances every CType is allowed to be rendered in a shortcut so you always have to explicitly set it to field = pid anyways).
I’m not sure whether this is actually a flaw of this or the source configuration of RECORDS (which shortcut is using internally).
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] pidInList keyword 'this' not working when CE is referenced via CType = shortcut because it points to the page of the shortcut CE and not to the page of the referenced CE Resolves: #93877 Releases: main
History 3
-
S P commented and changed TYPO3 Version
912 <span data-processor="relativetime" data-value="2024-12-18T10:28:08+00:00" > 12/18/24, 10:28 </span> -
S P commented and changed TYPO3 Version
1213 <span data-processor="relativetime" data-value="2024-12-19T08:40:12+00:00" > 12/19/24, 08:40 </span>Still valid on v13
-
S P commented and changed TYPO3 Version
1314 <span data-processor="relativetime" data-value="2026-06-11T09:10:50+00:00" > 06/11/26, 09:10 </span>Still valid on v14.
thisrefers to the page of the request, thus behaving wrongly in elements inside CTypeshortcutcoming on different pages.
Still valid on v12.
pidInList=thisstill refers to the “global” page id (the one from the page of the HTTP request). ForCType=shortcuthowever it must point to the pid of the referenced element. Workaround is still to usepidInList.field = pidin the TypoScript configuration of the referenced element (which is basically what one always wants if nothing is stated explictly, questioning whatpidInList = thisis actually good for ifpidInList.field = pidcovers more cases more robust).