Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client experienced a fatal error and the backend became unreachable after installing the WPML CMS plugin. This issue arose in conjunction with the OptimizePress Dashboard plugin.

Solution:
We recommended modifying the OptimizePress plugin to ensure compatibility with WPML. Specifically, the client should:
1. Edit the

helpers.php

file located at

plugins/op-dashboard/src/helpers.php

.
2. Find the function

get_installation_url()

at line 529.
3. Update the

add_filter

call to include four arguments:

add_filter('home_url', array($wpml_url_filters, 'home_url_filter'), -10, 4);

This adjustment helps the 'home_url' filter to pass the expected number of arguments, potentially resolving the fatal error. We also suggested that the client contact OptimizePress support to encourage them to officially support WPML or to implement this fix in their future releases. More information on getting plugins to work with WPML can be found at https://wpml.org/documentation/support/go-global-program/.

If this solution does not resolve the issue or seems outdated, or if it does not apply to your case, please open a new support ticket. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, you can also visit our support forum at https://wpml.org/forums/forum/english-support/.

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.

Tagged: 

This topic contains 0 reply, has 0 voices.

Last updated by Bruno Kos 9 months ago.

Assisted by: Bruno Kos.

Author Posts
December 2, 2024 at 8:49 am

thomas-jamesW

Background of the issue:
I just installed everything for the first time, as soon as I install WPML CMS the whole backend crashes, had to disable the plugin at server level to get access back. Everything is latest versions as I just purchased this a few days ago. I appear to have all the min requirements according to my hosting provider who checked this for me.

Symptoms:
Fatal Error WP backend unreachable after installing WPML CMS.

Questions:
Please can you advise how to install your plugin successfully?

December 2, 2024 at 9:47 am
December 2, 2024 at 2:46 pm #16466905

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

To troubleshoot this problem, I'll install the Duplicator plugin and generate packages for further debugging purposes. I'll ensure to exclude all media files to maintain a minimal package size. You can find more information about the process here: [link](https://wpml.org/faq/provide-supporters-copy-site/). Please confirm if this approach is acceptable to you.

Also, can you tell me after we activate WPML, is there something we need to click specifically to get the fatal error? Or it happens on its own after some browsing.

December 4, 2024 at 2:06 am #16474166

thomas-jamesW

Hi,

Thus far whenever the plugin is activated the fatal error occurs either immediately or within a minute or so.
Duplicator method is fine.

Is there a way to get notifications by email for this chat? I've been waiting for a response and never got an email, only now to login and find there was a response ages ago.
Thanks.

December 4, 2024 at 9:59 am #16475568

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

This has been escalated to our 2nd tier team team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you.

As for emails, do you have such option before the first reply? If so, can you change it so that it looks like mine?

EMAILS.jpg
December 5, 2024 at 3:26 pm #16482558

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Can you please try the following:

1. **Edit the `helpers.php` file in the OptimizePress Dashboard plugin**:
- Locate the file at: `plugins/op-dashboard/src/helpers.php`.
- Find the function `get_installation_url()` at line 529.
- Update the code where the `add_filter` is called to specify 4 arguments:

 add_filter('home_url', array($wpml_url_filters, 'home_url_filter'), -10, 4);

This will ensure that the `home_url` filter properly passes the expected number of arguments.

Note that OptimizePress does not appear to be officially listed as compatible with WPML. This issue might be caused by a custom implementation by the plugin authors.

If possible I suggest you reach out to OptimizePress support to report the issue and suggest that they update the `helpers.php` code to fix this problem in future releases. You can also send them to https://wpml.org/documentation/support/go-global-program/

December 6, 2024 at 6:46 am #16484666

thomas-jamesW

Hi, Thanks for this.
I replaced the code (see left side version on the screenshot)
This caused fatal error on frontend and backend of site.
Either this was not how it is supposed to be replaced, or it didn't work. Please let me know.

The sales support before I purchased said they didn't know if it worked with OP or not but that it can work with any/all builders in some way. If it is just not compatible, I may need to try a different plugin, support at OP is quite slow, i don't know if they will implement this fix quickly or not.

Screenshot 2024-12-06 at 13.43.25.png
December 6, 2024 at 10:30 am #16485413

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I added

add_filter('home_url', array($wpml_url_filters, 'home_url_filter'), - 10, 4);

to both filters but I don't see the fatal error even after browsing for a while.

If it shows up for you again, can you send a error log again? If it shows it should say something different, another error message.