This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're experiencing a Fatal Error when trying to reactivate the WPML Multilingual CMS plugin after deactivating other plugins for troubleshooting, and you have the WP-Optimize plugin activated, it might be due to a conflict between these plugins.
Solution:
We recommend trying the following workaround:
1) Open the file
.../wp-content/plugins/wp-optimize/cache/class-wpo-cache-config.php
.
2) Locate line 225 and comment it out:
// 'uploads' => wp_normalize_path(wp_upload_dir()['basedir']),
We have notified the plugin authors to address this issue in their code. Meanwhile, we suggest reaching out to them as well to ensure a permanent fix.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket for further assistance at WPML Support Forum.
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.
No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Tagged: Bug, Compatibility
This topic contains 5 replies, has 2 voices.
Last updated by Marcel 1 month, 2 weeks ago.
Assisted by: Marcel.
Author | Posts |
---|---|
September 18, 2024 at 10:24 pm #16195538 | |
johnM-88 |
<b>Background of the issue: </b> This problem is almost identical to the one reported here: https://wpml.org/forums/topic/help-wpml-multilingual-cms-fatal-error-after-reactivation/ <b>Symptoms: </b> <b>Questions: </b> |
September 19, 2024 at 4:19 pm #16200249 | |
Marcel Supporter
Languages: English (English ) German (Deutsch ) Timezone: Europe/Madrid (GMT+01:00) |
Hi, I haven't come across any recent issues related to the plugin you mentioned. It seems that the get_current_language() function is being called on a null object, which means the necessary language data isn't being initialized correctly. This could be a compatibility issue with the plugin WP-Optimize. DO you have a staging environment where we can take a look? I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it. Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you. IMPORTANT Best Regards, |
September 24, 2024 at 3:06 pm #16215846 | |
Marcel Supporter
Languages: English (English ) German (Deutsch ) Timezone: Europe/Madrid (GMT+01:00) |
Thanks! I was able to see the issue. I tested this further on a Sandbox environment and can't confirm any incompatibility. You can test this here using the steps you described: hidden link. So, the issue only happens in your specific hosting environment. I already deactivated all plugins that are not needed for this test. The settings from WP-Optimize I can exclude as the error cause. I exported your settings and imported them on my Sandbox. You can provide us with a duplicate copy of your installation, so I can repeat the test locally. Best Regards, |
September 25, 2024 at 5:57 pm #16222211 | |
Marcel Supporter
Languages: English (English ) German (Deutsch ) Timezone: Europe/Madrid (GMT+01:00) |
Hi, thanks for the copy. It only happens with the Multi-Domain config. Once I turn it off, it works. I will simulate this locally using a Multi-Domain environment and keep you updated. Best Regards, |
September 26, 2024 at 4:51 pm #16226846 | |
Marcel Supporter
Languages: English (English ) German (Deutsch ) Timezone: Europe/Madrid (GMT+01:00) |
Hi, I was able to reproduce the issue in a multi-domain environment from scratch and have escalated it to our compatibility team for further investigation. We may need to reach out to the authors to request a code modification, but we'll first explore whether a temporary workaround can be implemented. Best regards, |
September 30, 2024 at 6:13 pm #16237425 | |
Marcel Supporter
Languages: English (English ) German (Deutsch ) Timezone: Europe/Madrid (GMT+01:00) |
Hi, When the WP-Optimize plugin is activated, there’s a conflict with WPML, specifically with the $url variable being passed to WPML_URL_Cached_Converter::convert_url() in the file .../wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php. Instead of returning the correct URL (e.g., hidden link), it returns /wp-content/uploads/2024/09. Workaround: 1) Open the file .../wp-content/plugins/wp-optimize/cache/class-wpo-cache-config.php. // 'uploads' => wp_normalize_path(wp_upload_dir()['basedir']), We will notify the plugin authors to address this in their code. In the meantime, I suggest reaching out to them as well to ensure a permanent fix too. Best regards, |