Incompatibility with Image Source Control Plugin
Description There is an incompatibility between the gallery-block-lightbox plugin and the Image Source Control plugin by Thomas Maier (https://wordpress.org/plugins/image-source-control-isc/).
Specifically, the lightbox functionality fails when dealing with links within elements that have the class "isc-source-text".
Steps to Reproduce
- Install and activate the gallery-block-lightbox plugin.
- Install and activate the Image Source Control plugin by Thomas Maier. https://wordpress.org/plugins/image-source-control-isc/
- Add an image with a source link that uses the "isc-source-text" class.
Expected Behavior The lightbox should function correctly and links within elements with the class "isc-source-text" should navigate to the external website.
Actual Behavior The lightbox does not function correctly with links within elements with the class "isc-source-text". When I click on the link, the lightbox opens, but not the link. Although the link is displayed correctly at the bottom left. If I deactivate the lightbox, the link works correctly again.
Suggested Solution Please modify the gallery-block-lightbox plugin to ignore links within elements that have the class "isc-source-text". This should resolve the conflict and allow both plugins to work together seamlessly.
FYI, I am the developer of Image Source Control and had a look at this before. It seems that the click event is used to trigger the lightbox, hence my suggestion to exclude links in the isc-source-text class from it. Let me know if you have any questions.
Hi @SchneiderSam @webzunft,
I tried to reproduce the issue but it works fine for me:
But I don't see any links with the isc-source-text in the source code.
@goaround thanks for the response. I think you have to aactivate the overlay:
Not sure if you need the PRO Version @webzunft ?! :-)
I can't choose "Zeige das Overlay innerhalb von HTML-Tags mit Inline Style" with the free version.
Can you please send me a link to your website where I can see the issue?
https://baubeaver.de/fachwerkhaus/
For example:
"Franzfoto..." is the Brokenlink. The next Link works fine
I think I have the same problem when I haven't activated the function "Zeige das Overlay innerhalb von HTML-Tags mit Inline Style". Interestingly, the link to the license key works, but not directly to the image. So left doesn't work, right does.
As far as I can see, the images are embedded directly in the content. No Pro features needed. Though it seems that one needs to enable licenses and add a linked license to the image.
Ok, I found the issue. Baguettbox.js tries to create a Lightbox for every link which contains an image (jpg, png... at the end of the href attribute) inside .wp-block-image Unfortunately the Wikipedia-Link here https://commons.wikimedia.org/wiki/File:Winterstettenstadt_-_Fachwerkhaus_im_Blumenschmuck.jpg ends with .jpg but it's not an image.
Unfortunately, I can't exclude the class .isc-source-text because its already inside .wp-block-image
My suggestion would be to add a # at the end of the link e.g. https://commons.wikimedia.org/wiki/File:Winterstettenstadt_-_Fachwerkhaus_im_Blumenschmuck.jpg# and it works fine because it's not recognized as an image anymore.
Otherwise @webzunft has to add a class to the a-tag directly, and then I can exclude the lightbox for this link, but the class has to be on the a-tag.
Thanks @goaround . Since I have full control over the a tag, I can add a class to them. Any preferred choice?
isc-source-link?
Since this is only for compatibility between our plugins, I wouldn’t want to add markup that 99% of users wouldn’t need. How about a class I only add if your plugin is also enabled with your name in it?
Then use no-lightbox
@goaround would you be able to reach out to me via https://imagesourcecontrol.de/support/ so I can share a test site with you we can use to test the solution?
@goaround Are there already plans for when this will be implemented? :-)
Hi @SchneiderSam @webzunft,
Already done two weeks ago: https://github.com/goaround/gallery-block-lightbox/releases/tag/1.14
If it does not work as expected, please provide a link where I can check the issue.
@goaround thanks so much. And also thanks for implementing GenerateBlocks. 🥳
Thanks @goaround , I applied the class to our image source links and saw that it works. It will go out with the next update of the main plugin.