Bug #105984
openInconsistent backend preview renderer behavior
0%
Description
My project contains a content element where i can select starting points (system folders via TCA type group). With that data i collect records from the selected folders.
I created a content element that is using the database-query data processor:
tt_content.staffmembers_storage { # template setup is in another location dataProcessing { 10 = database-query 10 { as = staffmembers table = tx_staff_staffmember_item pidInList.field = tx_staff_startingpoint orderBy = sorting dataProcessing { 10 = files 10 { references.fieldName = image as = image } } } } }
Then i created the following setup for the backend preview:
mod.web_layout { tt_content { preview { staffmembers_storage = EXT:staff/Resources/Private/Templates/Preview/StaffmembersStorage.html } } }
The output in the frontend works without problems. I get the staffmembers records and can process them as expected.
In the backend preview template i also get data output and try to access the records but there are no usable items in the "record" object. There is data in tx_staff_startingpoint but this lists only the selected folders as items. There is no sight of the desired records.
What made me create this issue is the fact that i have nearly the same content element. In this case you can select individual records (TCA type group) in the content element. This is the setup:
tt_content.staffmembers_curated { dataProcessing { 10 = database-query 10 { as = staffmembers table = tx_staff_staffmember_item uidInList.field = tx_staff_staffmembers pidInList = 0 orderBy = sorting dataProcessing { 10 = files 10 { references.fieldName = image as = image } } } } }
mod.web_layout { tt_content { preview { staffmembers_curated = EXT:staff/Resources/Private/Templates/Preview/StaffmembersCurated.html } } }
With that not only the frontend output works, but also the backend preview gets the requested records in the field tx_staff_staffmembers.
Conclusion:
So in my opinion the behavior of the backend preview renderer is inconsistent/wrong in the case of the pidInList definition. Also due the fact that the frontend output is working with my typoscript setup.
Updated by Rudolf Rohaczek 14 days ago
- Subject changed from Wrong backend preview renderer behavior with pidInList definition to Inconsistent backend preview renderer behavior