Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, it looks like WPML (or another plugin) is modifying the encoding of special characters in the link URLs on translated pages.

    For example, the copyright character in the file name:

    • Original URL: https://www.urbanpresents.net/wp-content/uploads/2023/11/2007_SALVAJE-SELVA-Banos-y-Mendigo-Murcia-2007-?SALVAJE-SELVA-2.webp
    • Corresponding URL on translated page: https://www.urbanpresents.net/wp-content/uploads/2023/11/2007_SALVAJE-SELVA-Banos-y-Mendigo-Murcia-2007-©SALVAJE-SELVA-2.jpg

    In the modified URL, the copyright symbol (?) is encoded as © which causes PHP functions such as parse_url() (used by WordPress) to interpret the the URL different, effectively segmenting the URL as you describe.

    The modified file name may also be occurring because the translated page appears to be using JPG files, while the original page is using WEBP files. If the JPG files are generated by WordPress (or a plugin), the filename of the generated file is likely being encoded differently than the original file, leading to the issue noted above.

    Other translated pages that use the WEBP files (example) appear to be displayed in the lightbox without issue. Switching to the WEBP files on the translated page you referenced may resolve your issue.

    Beyond that, removing special characters (such as the copyright symbol) is highly recommended to avoid character-encoding issues altogether and to ensure the highest compatibility with all web browsers.

    I’m marking this as “resolved” as the issue is not directly related to SLB, but rather due to higher-level character-encoding issues. If you are experiencing the issue with files with web-safe file names, please provide an updated link to a page that exhibits the issue, and I would be glad to take another look.

    • This reply was modified 12 months ago by Archetyped.
    Thread Starter kersavond

    (@kersavond)

    thanks for your detailed feedback!
    I looked more into it, and it seems indeed to be a wpml problem.

    • This reply was modified 12 months ago by kersavond.
    Thread Starter kersavond

    (@kersavond)

    i just got feedback from wpml and they gave me a js fix, not things are working good again:

    https://wpml.org/forums/topic/on-the-translated-pages-a-click-on-a-lightbox-doesnt-work-here/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘lightbox doesn’t work on wpml translated page’ is closed to new replies.