Home Forums Basel support forum Compatibility issue with WPML when trying to set language specific content

Compatibility issue with WPML when trying to set language specific content

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #86824

    duvigroup
    Participant

    While trying to update the logotype within WPML’s string translations, the logotype overwrites itself. For example, I have 3 languages. Swedish being the main. I will set the swedish logotype in the basel theme settings. Then head over to String translations to update the english and german versions of it. Upon saving both and refreshing the site. The Swedish logo sets itself to the english one.

    #86841

    Artem Temos
    Keymaster

    Hi,

    Please, describe to us your problems in a bit more details. Attach some screenshots and provide us with a list of steps on how to reproduce it on your website. We will need your admin access as well to check the translations settings.

    Thank you in advance.

    #86845

    duvigroup
    Participant

    No problem! Here is the step by step process of me trying to fix the translation for the logotype. If you need more info let me know.

    To reclarify. The default domain is postersprints.se

    Also each screenshot can be referenced by its name. I.e. Step_1.png is going to be related to that step.

    Step 1:
    I head over to the Theme settings -> Header -> Logo. Here i make sure the logotype is set to swedish, if it isn’t i update it and press Save Changes.

    Step 2:
    I head over to WPML -> String Translation -> Search for: logo

    I find my string translation labeled like this. As can be seen in the screenshot. The original string translation does not even show in the language that it has been saved in, in the theme settings. ( It didn’t even do that before actually ) Regardless the same issue still occurs here. If i update the International logotype from:
    https://postersprints.se/wp-content/uploads/2018/04/postersprints-logo-se.png
    to
    https://postersprints.se/wp-content/uploads/2018/04/postersprints-logo-en.png

    After saving this change and refreshing the page, the change clearly does not take effect.
    There isn’t really much more to it.

    Attachments:
    You must be logged in to view attached files.
    #86850

    Artem Temos
    Keymaster

    Please, disable all external plugins that are not related to our theme except WPML. Including your dropins and must use plugins and be sure that there are no any other cache mechanisms enabled on your website.

    #86851

    duvigroup
    Participant

    Caching is automatically disabled when you are logged in. I am unable to disable all the plugins today as i don’t have a development environment ready on the site. Would it be okay if you tried to take a look at the problem without the plugin removal? Otherwise we would have to pick up this topic on monday.

    #86867

    duvigroup
    Participant

    I don’t exactly know how the translation plugin works. But from first glance it just looks like the english and swedish translations are sharing the same reference to each other causing them to overwrite. So when i set the logo to english, it will also set the swedish logo to english, and vice versa.

    I assume you will want to have a stripped development environment to solve this so i will prepare this for monday 🙂

    #86897

    Artem Temos
    Keymaster

    Yes, development environment without cache would be great. Currently, even if we logged in, we don’t see the logo changes on the frontend. So contact us when you will be ready.

    Regards

    #87463

    duvigroup
    Participant

    Thats just the thing, the content is not translated in the correct languages because of the bug i am encountering. Additionally, the issue only occurs on the domain based WPML translation. After a few hours the translation simply changes itself back to one of the other translations and i mean that literally.

    I am currently in a support ticket with WPML looking at the problem. Any additional insight you could provide on the issue would be useful. This could be anything from how you implemented the handling of the WPML translations to even the php file that handles the updating of the text in the Theme settings.

    If you would like to experiment with this, you could attempt accessing our staging site. However the issue does not occur on the staging site because we translate content via the domain.

    #87495

    Artem Temos
    Keymaster

    OK, let WPML team check this first since we don’t see any problems from our side now. Contact us when you will have any further information.

    #87505

    duvigroup
    Participant

    Check the live site now. The login is the same as on staging site. Try to update the text in the theme settings for the cookie law info. Update the text to:

    Genom att fortsätta använda webbplatsen godkänner du att vi använder kakor (cookies). Läs mer om kakor.

    The text will not get updated. Feel free to check the sFTP.

    #87507

    duvigroup
    Participant

    I noticed that my activation key has been set for the domain stagingposter.wpengine.com

    Which is my staging site.

    The production site is postersprints.se, postersprints.de, postersprints.com

    could that explain why i have issues?

    When i look in the Theme license settings it states that it is activated..

    #87547

    Artem Temos
    Keymaster

    Could you please disable all external plugins that are not related to our theme and check how it works?

    #87558

    duvigroup
    Participant

    This is a very awkward problem now, i have tested the site without any other plugin but WPML. The issue persisted. I have then disabled WPML and obviously the problem was gone. The string fails to update when WPML is active because the WPML string translation is conflicting your theme somehow.

    I know that you do not want to look at the problem yourselves with the current conditions that i need it to test in, however it would be useful if you could provide me with the name of the functions that are related to the problem. I.e. the function that saves the data and the file in which the function is. It would be very helpful for me as i am not very familiar with the development process in wordpress and finding the source code for these things is very tedious when you don’t know where to look 🙂

    #87620

    Artem Temos
    Keymaster

    There is no one function in our theme that does this job. We are using Redux Framework plugin to manage our theme options interface. WPML should be fully compatible with this plugin as well.

    #87630

    duvigroup
    Participant

    Hmm i see. I managed to narrow down the problem to when exactly things go wrong. But this atleast tells me that it is not your theme thats to blame for the problem for sure but the Redux Framework.

    Since the strings in the Theme settings overwrite themselves in cooperation with WPML, and since its not a function you built then its not up to you to fix.

    You can correct me on that if im wrong.

    I will prepare a very flexible testing environment to find the problem today. If you are still up for helping with the issue i will let you know when it is ready. Otherwise that is all 🙂

    #87654

    Artem Temos
    Keymaster

    Yes, contact us when you will be ready. Actually, we tested this translation on our development website and it works fine.

    #88381

    duvigroup
    Participant

    Hey,

    The WPML developers are still looking in the staging environment and i dont want both sides to disrupt each other, this is why i haven’t got back with you guys about it.

    I have decided to implement a temporary solution for now translating the section of the page with my own functions.

    Could you direct me to the theme file that renders the text for the popup and the cookies? It would speed up the implementation of the solution for now.

    #88393

    Artem Temos
    Keymaster

    Hi,

    You can find this code in the file inc/template-tags.php.

Tagged: ,

Viewing 18 posts - 1 through 18 (of 18 total)