Custom Links not updating for specific images in the same gallery.
-
Hello,
I have been using your plugin for a few months now and recently discovered what I believe to be some kind of bug. On the home page of my website, Fall3nWarrior, I have a gallery that features images with Gallery Custom Links assigned to them. However, when the page loads a few of the images still point to the image file instead of the Custom Link URL that I added to them in the Media Library. For example, the first image in the gallery has this issue, that way you don’t have to spend time figuring out which one.
After some time troubleshooting, I have ruled out a theme conflict or incompatibility since it correctly updates some of the images in the gallery with my current theme. I have also ruled out a plugin conflict by disabling all plugins except for the Gallery Custom Links plugin and the required plugins for the theme. I have also confirmed that _gallery_link_url entries in the database are showing the correct information and are being updated when changes are made in the Media gallery. Additionally, I am using PHP 7.3.33 and WordPress version 5.8.3. My site is hosted on SiteGround and uses SiteGround Optimizer and Cloudflare for caching. But I have disabled both while troubleshooting. The logfile from the plugin is at the bottom of this message.
After enabling the simple log setting and examining the log file it appears that it is detecting the img tag classes but for some reason, it is not reporting “Found Media {id}” for the image links that aren’t being updated as expected. Based on the log I think the issue is likely coming from the linkify_element function or the resolve_image_id function. It seems that it may be failing to find the mediaid. I am also wondering if it is failing due to the use of regular expressions in the plugin and the unique structure of my image urls.
I would also like to add that I use the Organize Media Folder plugin by Katsushi Kawamori from the WordPress repo and recently moved some of the images into different folders on the server for organizational reasons. I did find that moving the images that aren’t working properly into a different folder solves the issue but moving them back brings the issue back. I did not notice any discrepancies between non-working and working images in the posts and postmeta tables in the database so I don’t think the Organize Media Folder plugin is causing some kind of issue or data corruption. Plus, the working and non-working were moved using the same plugin.
So I’m not 100% certain that the issue is with your plugin or this other plugin but I thought I would share my findings in case it helps pinpoint an issue others have been experiencing too.
[23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6372 (URL: https://fall3nwarrior.com/designs/remember-the-brave-firefighter/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/remember-the-brave/firefighter.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6370 (URL: https://fall3nwarrior.com/designs/remember-the-blue-police/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/remember-the-brave/police.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6383 (URL: https://fall3nwarrior.com/designs/flag-of-freedom-american-flag/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/freedom-flags/flag-of-freedom.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 14228 (URL: https://fall3nwarrior.com/designs/always-advancing-mens-running/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/always-advancing/always-advancing-running.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 8271 (URL: https://fall3nwarrior.com/designs/americas-hero-german-shepherd/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/americas-hero-service-dogs/german-shepherd.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 8270 (URL: https://fall3nwarrior.com/designs/americas-hero-golden-retriever/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/americas-hero-service-dogs/golden-retriever.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6377 (URL: https://fall3nwarrior.com/designs/stone-cold-freedom-american-flag/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/freedom-flags/stone-cold-freedom.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6381 (URL: https://fall3nwarrior.com/designs/proud-to-serve-firefighter/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/proud-to-serve/firefighter.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6378 (URL: https://fall3nwarrior.com/designs/proud-to-serve-police/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/proud-to-serve/police.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 11140 (URL: https://fall3nwarrior.com/designs/support-the-blue-police/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/freedom-flags/support-the-blue.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6375 (URL: https://fall3nwarrior.com/designs/remember-the-brave-air-force/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/remember-the-brave/air-force.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6380 (URL: https://fall3nwarrior.com/designs/proud-to-serve-air-force/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/proud-to-serve/air-force.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6382 (URL: https://fall3nwarrior.com/designs/remember-the-strong-army/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/remember-the-brave/army.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6384 (URL: https://fall3nwarrior.com/designs/proud-to-serve-army/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/proud-to-serve/army.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6374 (URL: https://fall3nwarrior.com/designs/remember-the-brave-marine/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/remember-the-brave/marine-corps.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6386 (URL: https://fall3nwarrior.com/designs/proud-to-serve-marine/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/proud-to-serve/marine-corps.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6385 (URL: https://fall3nwarrior.com/designs/remember-the-brave-navy/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/remember-the-brave/navy.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6371 (URL: https://fall3nwarrior.com/designs/proud-to-serve-navy/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/proud-to-serve/navy.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: attachment-full size-full [23-Jan-2022 22:10:49 UTC] Linker: Found Media 6373 (URL: https://fall3nwarrior.com/designs/stay-frosty-snowman/) [23-Jan-2022 22:10:49 UTC] Linker: The current link (https://fall3nwarrior.com/wp-content/uploads/designs/stay-frosty/stay-frosty.jpg) will be replaced. [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload [23-Jan-2022 22:10:49 UTC] Linker: Found img tag with classes: full-width wp-post-image lazyload
The page I need help with: [log in to see the link]
- The topic ‘Custom Links not updating for specific images in the same gallery.’ is closed to new replies.