• Resolved Tom Auciello

    (@toma0wp0org)


    Hello,

    Sorry to bother you. I really like your Lightbox. After trying many of them, I found yours to be the best. Thanks for offering it.

    I have been using it for over a year building a WP site of my travelogues. Everything was working well when a paused development for about 9 months. When I got back to it yesterday all the pieces needed updates, theme, plugins and WordPress. I updated them all and my post tiled gallery lightboxes worked normally. However, when I tried to create a new post, Lightbox with Photoswipe refuses to display the captions or enlarge the photos. (Captions are all added to the “caption” field on the Media Library.) The Lightbox settings on new posts have no effect on the captions or the photo size. Other settings like share and photo count operate normally in new posts.

    I tried creating a new post every way possible with no improvement. I even tried removing the “Lightbox with Photoswipe” plugin and replacing it. Still the original post lightboxes function properly and the new posts do not show the captions or enlarge the size. I looked over the other issues but couldn’t find anything related.

    Do you have any thoughts on what could be going wrong? Anything I can try to get it fixed? I’m not very experienced in working with the code, but I could try some things if I was guided a bit. Thanks for your help.

    Using Jetpack 10.4, Astra theme 3.7.6, Astra Widgets 1.2.9, WordPress 5.8.2, Lightbox with Photoswipe 3.2.6, Gutenberg ver 12.2.0 and BlockMeister 3.0.2.

    • This topic was modified 2 years, 10 months ago by Tom Auciello.
    • This topic was modified 2 years, 10 months ago by Tom Auciello.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    I think the issue is, that you do not link to the original images but to a smaller version of it. The working captions in older posts use the original name like “Samarkind-2.jpeg”. The non-working captions are images with names like “Baku-16-768×1024.jpeg”.

    However – using the correct name is crucial for Lightbox with Photoswipe to get the captions. Based on the name it will try to get the image meta data from the WordPress backend. So there is an image named “Baku-16.jpeg” but the link is for “Baku-16-768×1024.jpeg”. When the plugin now asks WordPress to get the information for “Baku-16-768×1024.jpeg” it won’t get anything as the image is not named like this.

    I will try to add a workaround for this situation to remove the added dimension “-NxN” from the name if no meta data was found using the name in the link.

    Plugin Author Arno Welzel

    (@awelzel)

    Release 3.2.7 will get the captions now even when linking to scaled image sizes.

    Demo: https://wordpress-demo.arnowelzel.de/lightbox-with-photoswipe-with-scaled-image/

    Edit: However – getting the correct image size linked is out of scope of my plugin. This has to be fixed in the gallery you are using. But at least the captions should be visible now.

    • This reply was modified 2 years, 10 months ago by Arno Welzel.
    Thread Starter Tom Auciello

    (@toma0wp0org)

    Thanks so much for your “lightning” reply. I understand exactly what you are saying. I did choose to “link to the media” in the option in the post setup as instructed. However, I chose the pix from the media library exactly the same way as in the earlier posts. As far as I know they were the only options available to choose from the media library and those options did have the captions. I wonder if there is something “new” going on, like Jetpack or Astra linking to a smaller copy of the photo from one of their servers, to provide “faster loading” but mucking up the situation in the process. Hummm……

    I’ll circle around and see if there is anything like that operating in my site. This is very helpful. Thanks so much for your analysis. Please let me know if you have any other thoughts or ideas.

    Later……….. Tom

    Plugin Author Arno Welzel

    (@awelzel)

    I just did a test on my demo site and it seems that Jetpack tiled gallery has a new bug: even when enabling “Link To: Media File” it will only create links to smaller versions and not the original media files.

    Also see my example here – the same problem as on your website:

    https://wordpress-demo.arnowelzel.de/tiled-gallery-jetpack-as-of-2022-01/

    My older demo page is still ok, so there is some new bug with the Jetpack tiled gallery:

    https://wordpress-demo.arnowelzel.de/lightbox-with-photoswipe/

    I recommend to ask the Jetpack team about this.

    Edit: I remember that the Gutenberg gallery block had exactly the same problem. Also see here: https://github.com/WordPress/gutenberg/issues/13851

    Maybe this is a similar issue here.

    • This reply was modified 2 years, 10 months ago by Arno Welzel.
    Plugin Author Arno Welzel

    (@awelzel)

    I just found a bug report about this for Jetpack tiled gallery:

    https://github.com/Automattic/jetpack/issues/16940

    I will see what I can do to mitigate the problem on my site. Since my plugin can fix the links in the generated HTML code as well it should be possible to provide an “repair defect Jetpack gallery links” option.

    Thread Starter Tom Auciello

    (@toma0wp0org)

    Gosh, Arno. You really are on top of this. I’ll definitely notify Jetback about it, too. Let me know if you find a work around, but I hope a solution ultimately comes from Jetpack.

    Thanks………… Tom A

    Plugin Author Arno Welzel

    (@awelzel)

    Ok I found a way to fix the links in the rendered HTML output on the page:

    https://wordpress-demo.arnowelzel.de/tiled-gallery-jetpack-as-of-2022-01/

    So even if Jetpack tiled gallery produced incorrect links, my plugin will fix this in the HTML output. The whole feature can always be disabled if it causes any problems.

    I still need to do some further testing, but so far it looks good and I will soon release the update.

    Plugin Author Arno Welzel

    (@awelzel)

    Release 3.2.8 contains an optional fix to remove size parameters from image links.

    If this option causes any issues, you can always disable it in the backend settings. If there is an update of Jetpack, you may also check if the option is still needed.

    Thread Starter Tom Auciello

    (@toma0wp0org)

    Thanks for working on this, Arno. I tried the new version and it does now show the captions, but not on all of the photos. Some of the captions are still missing. I’m not sure why. I did notice that on the correctly working posts (pre Jetpack update) some of the images use a file called “image-scaled.jpeg” instead of the “image.jpeg” file. This might be because the original uploaded image was very large and exceeded some upper bound? Not sure if this is why some of the captions are missing?

    Also, the images are not enlargeable, like the others. They are still fixed at the 1024×768 standard size. Turning on or off your new setting does not affect the size. Was it supposed to? hummm……. I wonder if Jetpack is working on a fix?

    Thanks for your help.

    Later…….. Tom

    • This reply was modified 2 years, 10 months ago by Tom Auciello.
    Plugin Author Arno Welzel

    (@awelzel)

    About the image sizes: this is caused by the fact, that my plugin reads the image size from the original linked file and not from the “fixed” one. I just published an update to version 3.2.10 which fixes this.

    About the captions: the captions are either taken from the “caption” field or from the description depending on which is available and which option is set in the backend. If captions are missing, maybe you forgot to add them to the same field as for the other images.

    Thread Starter Tom Auciello

    (@toma0wp0org)

    I did some additional testing (with 3.2.8) before you updated to ver 3.2.10. As it turned out, I turned on the Jetpack “Enable Site Accelerator” and then turned it off again and it tripped something in the code (?). After that, the sizes were all showing properly as long as I had your new box checked. Without it the sizes were reduced. So size now works with your fix.

    With version 3.2.10 The captions are still operating the same. They show with your fix only and 5 of them are still missing. I checked for the captions in the media library and they are there. I even looked at all 8 of the various file sizes that were created in my home directory and they all had captions imbeded. Those 5 have a different naming system. When I uploaded these 5 they were very large images (over 1.2 Meg) and were downscaled on arrival. In the Media library these 5 images file name is subscripted with “-scaled” instead of the original name. Somehow, this has caused the captions to not show in the Lightbox. Maybe the captions are stored in some other database or something? This gets beyond my skillset.

    While I was poking around in Jetpack I turned on their Carousel option. It projects a full screen lightbox for the Tiled Gallery but with many fewer options than “Lightbox with Photoswipe”. However, the 5 pix with the missing captions showed their caption in the Jetpack Carousel lightbox.

    At this point, “Lightbox with Photoswipe” is working well with your fix except for a few of the captions. I’m not sure where to go from here other than wait for Jetpack to fix their bug or try to download smaller replacements for the few large files that are not showing their captions.

    Thanks a lot for your help.

    Later…….. Tom

    Thread Starter Tom Auciello

    (@toma0wp0org)

    I deleted and replaced the 5 files that wouldn’t show their captions. Wala! The captions now show. I also noticed that if I uncheck the option “Get the image captions from the database (this may cause delays on slower servers)” the Lightbox reverts to the original problem of no captions and small size.

    So, things are working well now, with all the fixes. Thanks so much for your help, Arno. Hopefully Jetpack will get their act together on that tiled gallery sometime soon.

    Later…….. Tom

    Plugin Author Arno Welzel

    (@awelzel)

    Thank you for the feedback. I’m happy that it turns out OK for you now.

    Thread Starter Tom Auciello

    (@toma0wp0org)

    Hello Arno. I am back after a couple of months working on my web site again. There have been a lot of updates to WordPress and all my plugins, including “Lightbox with Photoswipe”. Everything seems okay with my existing posts using “Lightbox with Photoswipe”, However, now, when I upload new image files for use in a post, any image that is larger then 2560 pixels on one edge will be “scaled” by WordPress and then will not show it’s caption in the lightbox. I found this explanation about why my images are scaled:

    Introducing handling of big images in WordPress 5.3

    I noticed that you have made a lot of changes in the lightbox code. Any idea if the changes might have affected its ability to display the caption on my “scaled” images?

    Thanks for your help. -Tom

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Captions Missing on “NEW” posts only, after Updates?’ is closed to new replies.