Skip Navigation

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.

Our next available supporter will start replying to tickets in about 3.43 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+02:00)

Tagged: ,

This topic contains 4 replies, has 2 voices.

Last updated by Marcel 3 days, 4 hours ago.

Assisted by: Marcel.

Author Posts
September 18, 2024 at 10:24 pm #16195538

johnM-88

<b>Background of the issue: </b>
I was trying to reactivate the WPML Multilingual CMS plugin after deactivating several other plugins for troubleshooting a different error. After solving that issue, I tried to reactivate WPML Multilingual CMS, and it returned a Fatal Error. Only after deactivating the WP-Optimize (by Updraft) plugin could I reactivate WPML Multilingual CMS successfully. I was then able to activate WP-Optimize without issue. This suggests there may be a plugin conflict. URL: hidden link

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>
Uncaught Error: Call to a member function get_current_language() on null in /home/username/public_html/mydomain2/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php:18

<b>Questions: </b>
Is there a known conflict between WPML Multilingual CMS and WP-Optimize?
How can I resolve the Fatal Error when reactivating WPML Multilingual CMS?

September 19, 2024 at 4:19 pm #16200249

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02: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
-Please make a backup of site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Best Regards,
Marcel

September 24, 2024 at 3:06 pm #16215846

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02: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,
Marcel

September 25, 2024 at 5:57 pm #16222211

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02: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,
Marcel

September 26, 2024 at 4:51 pm #16226846

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02: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,
Marcel