jonathanheilmann / ext-jh_magnificpopup

TYPO3 CMS Extension to integrate Magnific Popup
GNU General Public License v2.0
7 stars 13 forks source link

[BUG] The id of an content element will be used mutiple times #60

Open MySpace17 opened 6 years ago

MySpace17 commented 6 years ago

My Javascript didn't work anymore cause of using the id attribute with the same value multiple times.

If an content element is included as "normal content" and also as "inline content for magnific popup" on the same page the parsed site has the id of the original content element multiple times.

I am pretty sure that this is also an effect on all other magnific popup types.

Solution: Don't use the orignal TYPO3 uid of the content element. Use id=mfp-1234 instead of id="1234". Or (better way) id="mfp-1-1234" (1 stands for the uid of the plugin, 1234 for the content element)

jonathanheilmann commented 6 years ago

ough, this is ugly and not solved by fluid_styled_content element "shortcut", too. (Create a random content element, create a special content element "shortcut" and link to element created before. The Shortcut element uses the same id for the original and linked content element.)

Actually I've no idea on how to solve this.