Skip Navigation

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

Problem:
The client is experiencing a critical error on their site after enabling both the WPML plugin and Optimize Press. The error log indicates an issue with the WPML_URL_Filters::home_url_filter() function, which is expecting more arguments than provided.
Solution:
First, ensure you have a full backup of your site and database. If you have access to the WPML dashboard, navigate to WPML -> Support -> Troubleshooting and perform the following actions:
- Synchronize posts taxonomies
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Synchronize local job IDs
- Fix Terms count
- Fix post assignment for translations

If you cannot access your dashboard, follow these steps:
1. Use FTP to access the /wp-content/plugins/ folder.
2. Delete the sitepress-multilingual-cms and wpml-string-translation plugins.
3. Download the latest versions of the WPML plugins from https://wpml.org/account/downloads/.
4. Temporarily deactivate all plugins on your site.
5. Go to Plugins → All Plugins and upload the WPML plugins.
6. Reactivate them and then activate the rest of the plugins.

If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, 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. If the problem persists, please open a new support ticket 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.

Tagged: 

This topic contains 3 replies, has 3 voices.

Last updated by Andrey 6 months, 3 weeks ago.

Assisted by: Andrey.

Author Posts
October 7, 2024 at 12:52 pm #16261470

rafalR-6

Background of the issue:
I am trying to resolve a critical error that appears on my site after enabling both the WPML plugin and Optimize Press. The site in question is hidden link. I have already contacted Optimize Press support, and they indicated that the issue is on WPML's side. The error log shows: [02-Aug-2024 00:07:45 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WPML_URL_Filters::home_url_filter(), 1 passed in /home/zsadrianarustgi/public_html/adrianarustgi.com/wp-includes/class-wp-hook.php on line 326 and exactly 4 expected in /home/zsadrianarustgi/public_html/adrianarustgi.com/wp-content/plugins/sitepress-multilingual-cms-de/classes/url-handling/wpml-url-filters.class.php:291.

Symptoms:
A critical error appears on the site after enabling both WPML and Optimize Press.

Questions:
How can I resolve the critical error caused by WPML and Optimize Press?
Is there any documentation available to address this specific error?

October 7, 2024 at 8:31 pm #16263473

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly.

If you have access to the dashboard with WPML active, please try these steps. Please be sure to make a full backup of your site and database.

Then, go to WPML -> Support -> Troubleshooting.

Look for 'Clean up' and click the following:
- Synchronize posts taxonomies
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Synchronize local job IDs
- Fix Terms count
- Fix post assignment for translations

If you don't have access, please upload a copy of your OptimizePress plugin on this test site that I set up for you so we can see if we can reproduce it there. This link will log you in: hidden link

October 8, 2024 at 12:26 pm #16265391

rafalR-6

Unfortunately, I can't access the dashboard with WPML active, because when I enable WPML the site throws a critical error.

I have installed the OptimizePress plugin on the site you prepared for me.

I'm waiting for help.

October 8, 2024 at 2:58 pm #16266103

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

This is Andrey here. I will be further assisting you. I hope this is fine.

Could you please try the following steps on your site?

1. Using FTP, go to /wp-content/plugins/ folder

2. Find sitepress-multilingual-cms and wpml-string-translation plugins

3. Delete them

4. Now, you can have access to the dashboard

5. Download the latest version of WPML plugins from here https://wpml.org/account/downloads/

6. Temporarily deactivate all plugins on your site

7. Go to Plugins → All Plugins and upload WPML plugins

8. Activate them

9. Activate the rest of the plugins

I hope that it will be fine.