Bug #76483
closedClickenlarge Rendering doesn't work for fluid_styled_content
0%
Description
Related to: Bug #70317
The bug seems to be resolved, in fact the function is still not working or the way how to implement it is not properly documented.
When inserting a image and enabling "click enlarge" it will in the frontend still be a normal image with the RTE-parameters data-htmlarea-file-uid="xxx" and data-htmlarea-clickenlarge="1"
No precessing to create a link for it or any other function to open it in a lightbox.
Do you need further information? Is there maybe an update/other bug I've not found yet?
Best regards
Updated by Riccardo De Contardi over 8 years ago
Hi. if I understand your question, I think you have to add manually JQuery and the lightbox javascript plugin (or use an extension)
Updated by Eve Green over 8 years ago
Hello Riccardo,
we have lightbox functionality. This one is a render issue. When saving a content element the render process should wrap the image with a link element. This should happen automatically but isn't.
Updated by Riccardo De Contardi over 8 years ago
Ok, now I think I've seen the problem (8.2-dev):
Steps to reproduce:
1) use only Fluid Styled Content
2) enable images usage in RTE (ext manager)
3) TS setup > include static from extensions > ClickEnlarge Rendering (rtehtmlarea)
4) edit a text w/image RTE, add an image inside RTE, activate click-enlarge
Result: as far as I can see, the image is wrapped with an anchor, but the rendered HTML is:
<a href="/index.php?eID=tx_cms_showpic&file=80&md5=476984090e8882156aa4411d2e27f9f42ec260e0&parameters%5B0%5D=YTowOnt9"> <img src="/fileadmin/user_upload/1031.jpg" width="200" height="80" alt="" title="" style=""> </a>
which does not work.
Explanation:¶
the loaded typoscript ClickEnlarge Rendering (rtehtmlarea) contains this line:
lib.parseFunc_RTE.tags.img.postUserFunc.imageLinkWrap < tt_content.image.20.1.imageLinkWrap
but tt_content.image.20.1.imageLinkWrap
is defined only when you use CSS styled content
if you use CSS styled content instead of Fluid Styled content, everything begins to work (that is: the image is opened via javascript, but without the lightbox)
IMHO we should also match the html to have a consistent behavior with that of the "text with media" lightbox, something like:
<a href="/fileadmin/user_upload/1031.jpg" class="lightbox" rel="lightbox[XX]"> <img src="/fileadmin/user_upload/1031.jpg" width="200" height="80" alt="" title="" style=""></a>
Updated by Eve Green over 8 years ago
Hello Riccardo,
as I understand the result differs from Typo3 7 which I'm using currently.
Steps to reproduce in Typo3 7.6.9:
1) use only Fluid Styled Content
2) enable images usage in RTE (ext manager)
3) TS setup > inlcude static from extensions > ClickEnlarge Rendering (rtehtmlarea)
4) edit a text w/image RTE, add am image inside RTE, activate click-enlarge
Result in "toggle text mode" RTE:
<img data-htmlarea-clickenlarge="1" src="http://[host]/fileadmin/_processed_/d/3/cimage_4b192de28f.jpg" data-htmlarea-file-uid="2102" height="200" width="300" />
Result in Frontend:
<img data-htmlarea-clickenlarge="1" src="http://[host]/fileadmin/_processed_/d/3/cimage_4b192de28f.jpg" data-htmlarea-file-uid="2102" height="200" width="300" />
My expectation would be, that after including the image and enabling click-enlarge for it, the render process should make a link out of this image which seems to work at least partly for Typo3 8.
As I've seen there were some issues regarding Typo3 8 too and maybe already a fix for it but there's nothing for Typo3 7, which we are using and which is currently the only stable version.
Updated by Sebastian Klein over 8 years ago
Hi Eve,
do you by any chance use a custom TypoScript for lib.parseFunc_RTE
?
The static template ClickEnlarge Rendering (rtehtmlarea) adds some configuration to that lib.
If you have a TypoScript that looks something like this:
lib.parseFunc_RTE < lib.parseFunc lib.parseFunc_RTE { [configuration here] }
and if this TypoScript is loaded after the static template of rtehtmlarea, the latter just gets overwritten. You can check this by taking a look into the Template Tools module:
- Template Analyzer: In the complete TS listing, is the TypoScript setup of rtehtmlarea included?
- TypoScript Object Browser: In the Setup Root, is
tags.img
a part oflib.parseFunc_RTE
? If not, then it gets overwritten at some point of your TypoScript setup.
Updated by Thomas Beck almost 8 years ago
Works with this typoscript :
lib.parseFunc_RTE.tags.img.postUserFunc{
imageLinkWrap{
JSwindow = 0
directImageLink = 1
linkParams.ATagParams.dataWrap = class="{$styles.content.textmedia.linkWrap.lightboxCssClass}"
}
}
Updated by Riccardo De Contardi about 7 years ago
- Status changed from New to Closed
- Assignee deleted (
Benni Mack)
I close this issue for now, as it does not affect TYPO3 version 8.7.x and CKEditor, and RTEHtmlarea development has been stopped.
Moreover, that will be a breaking change and will break existing websites. Please, try with the code suggested on comment 6
RTEHtmlarea has been decoupled from the core and its code is available on GitHub:
https://github.com/FriendsOfTYPO3/rtehtmlarea
If you still need this fixed please create a PR on GitHub.
If you think that this is the wrong decision, please let me know and I will reopen the issue.
Regards