I’ve seen some discussion prior, but nothing specifically calling this a bug or that even mentions it directly.
I use the theme option to turn the modal box on site-wide. One caveat of the modal box is that you must have the image link to the media file for it to work. Great. So why is it trying to open the modal box for an image with a Custom URL set?
By definition, it’s going to cause an error.
I’m trying to include a custom banner linked to an external author profile on a social media site at the end of posts. No matter what I do, setting ANY link on that image (it has no caption) forces it to open the image in a modal, which causes a well-documented error, “The image # could not be loaded.”
This is a bug that should be addressed. Here are the options I see that would solve this problem, each with different effects:
1. Have the site-wide setting affect each individual image setting to implement the modal. Currently, turning the site-wide option on does not change the position of the modal box switch in each image, thereby rendering that switch useless to do anything but turn the modal box on. If the site-wide setting forced this switch to the true correct position, then turning the modal off for a single image would be as simple as flicking that switch off.
2. Fix the code for the modal box to check if the image indeed does link to the media file. Since linking to the media file is the only way the modal works, then it should only be used when that is the case. This would allow the site-wide setting to be overridden per image by simply selecting to link to the attachment page or a custom URL. Currently, selecting none does turn the modal off, but selecting Custom URL does not and throws an error when the modal tries to fire.
3. A predefined class that can be added to image links that theme.js would use as an override per image, like no-modal or force-modal-off. This is more of a superficial fix, but it accomplishes the necessary outcome and allows us to engage our readers more with promotional images linking to external URLs in our posts.
Anyone second one or more of these fixes as a fast-track on the bug list? Any other ideas?
Thanks.
Hi,
We have added a quick fix(general modal) for user that have old posts to have this option to force modal for all images and we will try to improve this in a future update. You are right it is annoying but we will try to solve it and I have added your suggestions to our list and the developers will consider this.
Thanks and sorry for inconvenience!
-
This reply was modified 10 years by
Alin [tagDiv].
