Bug #93700
closedClickEnlarge viewhelper uses global cObj and delivers wrong data for lightbox therefore
100%
Description
Situation:¶
The default configuration for lightboxes in typoscript is:
linkWrap.lightboxRelAttribute = lightbox[{field:uid}]
So the generated markup refers to the uid of the current "data" in the cObj.
The rel-attribute is intended to group images to a "gallery" so the value shall be unique for this gallery.
Current behaviour:¶
{field:uid}
delivers the uid of the current page .
Expected behaviour:¶
{field:uid}
delivers the uid of the current content element .
Analysis:¶
The default implementation of the ClickEnlargeViewHelper uses the contentobject (cObj) stored in TSFE to render the imageLinkWrap
for an image.
This is obviously wrong as the data stored there is the page record.
The actual cObj (for the FluidTemplate) is not reachable within the viewhelper, but the data
of it is exposed in a Fluid variable.
Proposed fix:¶
Replace the data of the global cObj temporarily with the data from the Fluid variable, if available.
Updated by Gerrit Code Review over 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68310
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68473
Updated by Markus Klein over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3e524caf90dec676045d4f8942beb5574ba782b7.