Issue Bug New Stale

#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

S P 04/08/21, 05:55 updated 06/11/26, 09:10

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

  1. S P commented and changed TYPO3 Version 9 12 <span data-processor="relativetime" data-value="2024-12-18T10:28:08+00:00" > 12/18/24, 10:28 </span>

    Still valid on v12. pidInList=this still refers to the “global” page id (the one from the page of the HTTP request). For CType=shortcut however it must point to the pid of the referenced element. Workaround is still to use pidInList.field = pid in the TypoScript configuration of the referenced element (which is basically what one always wants if nothing is stated explictly, questioning what pidInList = this is actually good for if pidInList.field = pid covers more cases more robust).

  2. S P commented and changed TYPO3 Version 13 14 <span data-processor="relativetime" data-value="2026-06-11T09:10:50+00:00" > 06/11/26, 09:10 </span>

    Still valid on v14. this refers to the page of the request, thus behaving wrongly in elements inside CType shortcut coming on different pages.