This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 11:00 – 15:00 | 11:00 – 15:00 | 11:00 – 15:00 | 11:00 – 15:00 | 11:00 – 15:00 | - |
- | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | - |
Supporter timezone: Europe/Rome (GMT+02:00)
This topic contains 15 replies, has 3 voices.
Last updated by Laura 11 months, 3 weeks ago.
Assisted by: Laura.
Author | Posts |
---|---|
May 8, 2024 at 9:26 am #15605138 | |
nickG-26 |
I Wanted to use a translation plugin to translate my website. I dicided to buy a plan with you to use the translation functionality as well. Whenever I install the second one, WPML String Translation, my site gets an Fatal error, and I have to deactivateone of the two latter plugins to get my site working again. I checked the requirements defined at https://wpml.org/home/minimum-requirements/ After this I checked for theme compatibility using your online tool, and the theme i'm using, and other themes installed are also supported. Then I checked for plugin compatibility with the online tool, and found some plugins that i'm using were'nt defined in the tool. My conclusion was that it does not have anything to do with theme/plugin compatibility. Then i looked at the php error logs to see whats going on there and found out that whenever I have the combination of WPML Multilingual CMS and WPML String Translation plugins active I get errors stating that it cannot redeclare certain functions: I edited the code in the file by using the php function_exists for the function in question and then i got this error: The weird thing is that is is complaining that the function is already declared, but when you look at the full error message, it says it is already declared in exactly the same php file. Now I'm thinking that for some reason it is including the same plugin twice or something like that. What can I do to resolve this issue? I'm using a custom child theme based on the theme: Hello Elementor. Heres a full list of my installed plugins for reference: [removed] New threads created by Laura and linked to this one are listed below: |
May 8, 2024 at 4:40 pm #15607341 | |
Marcel WPML Supporter since 02/2019
Languages: English (English ) German (Deutsch ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, Yes, the function seems detected as it has already been declared in the same file. Please replace the WPML String Translation folder and re-install it again. Make sure to take a complete backup of your entire site before performing this action. If this doesn't help, please let me know. Then, we can look closer at a local site copy or a staging environment. Best Regards, |
May 8, 2024 at 7:19 pm #15607706 | |
nickG-26 |
I've already tried this a couple of times.. Please note that I'm running PHP8.2 on my hosting server. What else can you suggest? |
May 8, 2024 at 8:42 pm #15607834 | |
nickG-26 |
Ok, after hours and hours of trying everything I could think of I found the solution. Previously I developed a fully custom product page, fully coded by myself so I had full freedom in every aspect. I used php, html, js(jquery) and css to achieve this. Because my shop page is completely custom I had to incorporate the WPML logic into my code so it would react to currency changes made by the user. This enabled me to use code to get the product prices in the currency selected by the user: Before I activated the plugins needed for the translation part of WPML to be usable I had to include the WPML logic with do_action('wpml_before_init'); After activating both plugins: The inclusion of do_action('wpml_before_init'); caused some logic to be included twice, so my website generated a Critical error until I would deactivate one of the two plugins mentioned above. I hope this will help other people in the future, but above all, I think the plugin developers can use this information to make some changes to the plugin code, preventing this from happening in the future. I look forward to work with the translation functionality you provide. One last thing.. The plugin used up a lot of my translation credits in the time it wasn't working properly. I wrote a detailed error report and solution, so I hope that in turn you can help me by refunding the credits lost during this process. |
May 8, 2024 at 9:25 pm #15607903 | |
nickG-26 |
Translations previously executed are not working at all. I would like to start over completely fresh, it looks really messy right now and nothing is working properly. Can you please refund me the credits used so I can use the plugin again to make proper translations and could you please tell me how I can reset everything so the plugin can start over fresh? |
May 8, 2024 at 9:31 pm #15607906 | |
nickG-26 |
Before you ask, the translations ARE published. Dispite being published, the only part of my website being translated is the menu in my header. Like i mentiond above, I would like to have a refund in translation credits so I can start over fresh. |
May 9, 2024 at 7:04 am #15608819 | |
Laura WPML Supporter since 05/2018
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
Hi, I will take care of your issue from now on. First of all, thanks for the rport of the issue. I'll forward it to our devs and we'll see if it's possibile to add some code to prevent it happening again. Now, about the translations. When you use automatic translations, all translations are saved in our external server with a "translation memory". Therefore, your credits are not wasted, it's just a matter to retrieve the translation correctly. I can see from your plugins list you're not using String Translation. This is needed for Elementor and other plugins you're using, so it might be the reason why you can't see your translations. |
May 9, 2024 at 7:43 am #15609041 | |
nickG-26 |
The plugin list I provided in my first post was the situation where my site kept crashing when I installed and activated the string translation plugin, so that's the reasin why it wasn't on the list. In the current situation I have installed this plugin together with the wpml multilanguage cms. I can see the translations on most of the pages when i look under WPML->string translations, but when I go to the actual page on my website and switch to anothe language, the only thing that's being translated is my header menu. |
May 9, 2024 at 8:05 am #15609139 | |
Laura WPML Supporter since 05/2018
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
In any case, if you want to try a "fresh start", you can do a WPML Reset following these steps. As I said, translations are present in our server, so no extra credits should be consumed, unless something else is translated. If you keep having issues retriving the translations, I'll be happy to continue debugging. |
May 9, 2024 at 4:09 pm #15611538 | |
nickG-26 |
I tried following these steps, but at step 1 I already get different results than expected. It won't delete everything from the languages. Should I proceed to step 2 regardless? |
May 9, 2024 at 4:13 pm #15611590 | |
nickG-26 |
I was running it in firefox from my desktop. When I click the option to show the code that's generating the error I get this: <h4> <p> <br/> hidden link"> <style> .btn-danger { .btn-danger:hover, .btn-danger:focus, .btn-danger:active { .btn-primary { .btn-primary:hover, .btn-primary:focus, .btn-primary:active { Where the error is originating from the first line "<h4>" |
May 9, 2024 at 4:20 pm #15611598 | |
nickG-26 |
I see that all html tags and such get removed from the comment text, and only plain text remains. The error occurs on a h4 element on top of the snippet. |
May 9, 2024 at 4:22 pm #15611599 | |
nickG-26 |
I'm sorry for the spamming, but wouldn't it be better if I would make a temporary admin account on my wordpress site and share the login details with you? |
May 9, 2024 at 5:05 pm #15611693 | |
Laura WPML Supporter since 05/2018
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
I can activate a private box for credentials and take a look, but it would be better if you had a staging site. The devs told me they'd need more details about the initial issue and possibily even a copy of the site for further debugging. |
May 10, 2024 at 9:13 am #15613593 | |
Laura WPML Supporter since 05/2018
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
No it's normal to get that message and it's only relative to the Translation Editor, it won't impact our debugging. |
The topic ‘[Closed] Fatal error when using WPML Multilingual CMS & WPML String Translation combined’ is closed to new replies.