• Resolved elepot87

    (@elepot87)


    Hi,
    every few days I notice a strange issue with the language switcher on my website. When I click on the “EN” language option in the top-right menu, the content doesn’t switch to English — it remains in Italian. However, if I manually navigate to another page, the content appears correctly in English.

    I’ve also noticed that when this happens, the URL changes and includes this string:
    www.abekom.it/#TRPLINKPROCESSED

    To make it work again, I have to click on “Translate Site”, switch to the English version, click “Save” (even without making any changes), and clear the cache. After doing that, the language switcher works as expected again — for a while.

    Could you please help me understand why this happens and how to fix it permanently?

    Thank you!

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

Viewing 1 replies (of 1 total)
  • Plugin Support Madalina Ruzsa

    (@madalinaruzsa)

    Hi @elepot87,

    First, please check if you have the latest version of TranslatePress Multilingual, V 2.9.8.

    What does the #TRPLINKPROCESSED tag mean?
    – In PHP, we take the default page and parse it (we go through each HTML element and look for translations). We do the same with URLS. There are some pages where you find a URL several times, or there are some URLs that are generated by functions like get_permalink. We put #trplinkrprocessed on the ones we process. So, if a URL comes up again it will be ignored. At the end, we have a script that removes all #trplinkprocessed.

    Why does the #TRPLINKPROCESSED still appear?
    – They appear because we failed to complete the stripping.
    – There are some themes (themify — has caching) that cache the page_id. We don’t change the page_id and it’s possible that the page_id is being served. If it was caching on the URL it would take into account the language parameter.

    How to debug?
    – Remove the cache from the theme
    – Compatibility test — there are other plugins that read HTML like TP and it’s possible to break our code, and those will throw #trpgetext and #trplinkprocessed will appear. *Briefly* disable all other plugins and enable the default Twenty Twenty theme. Please also disable all add-ons. If this fixes the problem, enable everything one by one or in small bulks, checking each time to see when the problem returns.
    – Try replicating with the plugin that generates the URLs.
    – On non-dynamic links, it would work with exclude selectors from translations features from TP Settings ➝ Advanced tab.

Viewing 1 replies (of 1 total)

The topic ‘#TRPLINKPROCESSED’ is closed to new replies.