Support » Plugin: Simple Lightbox » not working with WPML

  • Running a completely updated environment ( WP 5.0.3, WPML 4.2.1 and SLB 2.7.1 ) SLB works correctly in the default language but doesn’t open the lightbox in the translated page gallery ( even if link setting is placed on “page attachment”, same configuration that makes default language work fine ).

    Is there a workaround for this?

    Tnx a lot

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • IMPORTANT: I’m talking about new Gutenberg gallery block!

    Plugin Author Archetyped

    (@archetyped)

    Hi, is the link you provided the default language or the translated gallery?

    In either case, it does not appear that links are being inserted into the gallery. Without links, there is nothing for the user to click on to launch the lightbox.

    There is currently a bug in WordPress’ new Blocks editor (i.e. Gutenberg) where the “Link to” option is reset to none for new galleries (unlike galleries in the Classic editor), so I would recommend checking gallery blocks in both versions of the post to ensure that “Attachment page” is selected (the Blocks editor also currently has a bug that loads the wrong links when the “Media file” option is used).

    If you are still experiencing this issue after ensuring the galleries are creating links, please provide and updated link of the working version of the post so that I can compare both versions.

    Thanks.

    canetwp

    (@canetwp)

    You’re right, sorry, at the time you checked the gallery the “link to” option was (for mistake) changed to none… now it links to “attachment page” again but the problem persists!

    Italian is the default language and it’s working fine (lightbox opens).
    English has the “anchor” (a) tag in the HTML output as it should, but the lightbox doesn’t open and link opens the attachment media page.

    Consider the gallery is a reusable block, so it is the same to both languages!

    But I’ve done another test right now, creating a brand new gallery in the second language and loading brand new images here, and than the same images were loaded fron the library in a new italian gallery: the problem is again only for the english gallery.

    • This reply was modified 4 months ago by  canetwp.
    • This reply was modified 4 months ago by  canetwp.
    • This reply was modified 4 months ago by  canetwp.
    • This reply was modified 4 months ago by  canetwp.
    canetwp

    (@canetwp)

    However, I think to remember (hope I’m not confusing with a different plugin, sorry) that a similar problem existed long ago (before gutenberg) and it could be workarounded by adding the string:

    link=”rel”

    in the shortcode of the translated page gallery … I do not know if this can help.

    • This reply was modified 4 months ago by  canetwp.
    Plugin Author Archetyped

    (@archetyped)

    Thanks, I’ve contacted WPML for access to their plugin as I need to take a closer look at what WPML may be doing behind the scenes that is stopping SLB from being active on translated pages.

    I’ll update this thread once I have a chance to evaluate the plugin further.

    Hi, any news here?

    After having done some more tests I’d like to update you that:

    1. ( one info I gave you was incorrect ) if I create a brand new gallery in a not default lang page the Simple Lightbox plugin WORKS!

    2. the lightbox for a gallery created as a reusable block works when the block is loaded on another page OF THE SAME language
    (see http://www.canet-wordpress.it/sviluppo/reusable-block-test/ )

    —-

    A proved fact is that before Gutenberg it was possible to copy the gallery shortcode from a default language page and use it on a translated page, so this SHOULD mean that WPML premits to “pass” images through languages.

    Maybe now Gutenberg is making things more complicated and inhibiting us this possibility, or maybe SLB manages to handle it differently with some changes to its code … this would be a joy indeed!

    For your help I’ve set a debug ambient for you, hope it’ll help you:
    http://www.canet-wordpress.it/sviluppo/
    http://www.canet-wordpress.it/sviluppo/en/

    Thanks for your great help (and plugin as well!)

    Plugin Author Archetyped

    (@archetyped)

    Thank you for the additional information. I have just received a response from the WPML developers, so I’ll hopefully be able to take a closer look at this soon.

    To ensure that I replicate your situation as closely as possible in order to reproduce the issue, please provide a list of the steps you take to create a gallery for the default language and then the same gallery for the other language (where SLB does not work). The more detail you can provide, the better.

    Thanks.

    sorry for the delayed answer!

    In the meantime I had created a ticket for the WPML developers and they ended up that SLB is not working with Gutenberg at all!
    Please read here:
    https://wpml.org/forums/topic/cant-re-use-reusable-galleries-in-translated-pages/

    This is completely non sense to me, ’cause I can make SLB work fine, but I’ve problems only in a specific situation.

    Steps to test are easy:

    1. loading pictures and creating a gallery in a page in the default language: SLB Works fine and lightbox opens correctly

    2. taking same pictures from the library a creating a brand new gallery in the translated page: SLB Works fine and lightbox opens correctly!

    BUT, when you have a gallery you don’t want to make it twice, one for the delault lang and one for the translated page, cause pictures are pictures and most of the time the don’t need to be translated (usually they have no capitions)

    SO…
    with Gutengerg, the best way to make the same gallery show up in many places is to creat a reusable block.
    If this reausable block of the gallery is loaded in another page of the default language SLB keeps on working, BUT if I use it on a NOT DEFAULT lang page, the lightovox breaks: the gallery shows up ok, but the lightbox doesn’t open and at the click on a pic you’ll be redirect to the attachment page.

    You’ll fine here a development environment where all things are clearly explaned:
    http://www.canet-wordpress.it/sviluppo/
    http://www.canet-wordpress.it/sviluppo/en/

    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.