Skip Navigation

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

Problem:
The client is using different domains per language and experiencing a 403 error when switching languages on their website.
Solution:
This error is caused by WPML triggering a mod_security rule (218500) from COMODO WAF, which is interpreted as an SQLmap attack.
We recommend the client contact the hosting support and ask them to whitelist the website for this mod_security rule.

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 7 replies, has 3 voices.

Last updated by Long Nguyen 11 months ago.

Assisted by: Long Nguyen.

Author Posts
January 11, 2024 at 8:34 pm #15176553

geoffreyR-5

WPML appears to be crashing my site -- it happens when simply navigating from English to French (or back) and through the site.

From the error log of the site:

[11-Jan-2024 20:14:17 UTC] PHP Warning: Cannot modify header information - headers already sent in /home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-language-per-domain-sso.php on line 123
[11-Jan-2024 20:16:16 UTC] PHP Warning: require_once(/home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/app.php): failed to open stream: No such file or directory in /home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/loader.php on line 32
[11-Jan-2024 20:16:16 UTC] PHP Fatal error: require_once(): Failed opening required '/home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/app.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/loader.php on line 32
[11-Jan-2024 20:16:16 UTC] PHP Warning: include(/home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/../../classes/plugins/wpml-plugins-check.php): failed to open stream: No such file or directory in /home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/ClassLoader.php on line 571
[11-Jan-2024 20:16:16 UTC] PHP Warning: include(): Failed opening '/home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/../../classes/plugins/wpml-plugins-check.php' for inclusion (include_path='.:/opt/alt/php74/usr/share/pear') in /home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/ClassLoader.php on line 571
[11-Jan-2024 20:16:16 UTC] PHP Fatal error: Uncaught Error: Class 'WPML_Plugins_Check' not found in /home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.php:67
Stack trace:
#0 /home/ccc/public_html/wp-includes/class-wp-hook.php(324): wpml_disable_outdated_plugins('')
#1 /home/ccc/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#2 /home/ccc/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#3 /home/ccc/public_html/wp-settings.php(506): do_action('plugins_loaded')
#4 /home/ccc/public_html/wp-config.php(99): require_once('/home/ccc/publi...')
#5 /home/ccc/public_html/wp-load.php(50): require_once('/home/ccc/publi...')
#6 /home/ccc/public_html/wp-blog-header.php(13): require_once('/home/ccc/publi...')
#7 /home/ccc/public_html/index.php(17): require('/home/ccc/publi...')
#8 {main}
thrown in /home/ccc/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.php on line 67

January 11, 2024 at 10:57 pm #15176832

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

While waiting for a supporter to be assigned to this ticket, please try the following:

1. Deactivate and delete WPML
2. Go to https://wpml.org/downloads/ and download WPML again
3. Manually upload the plugin to your environment through Plugins -> Add new -> Upload.

This will ensure that the version you are using at the moment is not corrupted.

also, please review your PHP Time Limit and verify that it's set to 30 or higher.

If the issue persists, go to WPML->Languages and verify that there are a minimum of 2 languages enabled and one of the languages is set as 'default'

Let us know your results, please.

January 12, 2024 at 12:41 am #15177035

geoffreyR-5

Thank you. We had already carried out all those suggestions so the errors reported before were occurring after all those steps.

January 12, 2024 at 4:52 am #15177206

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

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 have a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Look forward to your reply.
Thanks

January 13, 2024 at 2:53 pm #15181571

geoffreyR-5

Have you had a chance to look at this yet?

January 14, 2024 at 9:26 am #15181928

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I can switch the language to French and English in both admin area and frontend as well, without any errors. Here is the screen record hidden link

Can you please recheck this and the error log again?

January 14, 2024 at 6:44 pm #15182616

geoffreyR-5

Still doesn't work.

From the front end, not logged in, I switched from English (hidden link) to French (hidden link), which worked, but when switching back, it tried to load this URL: "hidden link" which led to a 403 error.

January 15, 2024 at 7:29 am #15183155

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Now I see the site is not working. However, I don't see the same error in the debug.log or error_log file on Jan 15.
I'm trying to restore your site on my localhost to investigate the issue but the backup file is too large and takes many hours to restore but not finish.

Please try to copy your site to a staging site and I can troubleshoot the issue, or try to take the backup file again and exclude some unnecessary folders like /wp-content/uploads/, /wp-content/cache/ ... to reduce the file size and share it again.

I also suggest you disable the option
- "Auto sign-in and sign-out users from all domains"
- Pass session arguments between domains through the language switcher: Disable this feature
in WPML > Languages > Language URL Format and see if it helps.

Look forward to your reply.
Thanks

councilofchurches.ca 2024-01-15 14-12-28.png
January 15, 2024 at 6:38 pm #15186543

geoffreyR-5

Thanks for your help.
In the meantime, we discovered the reason for the problems.
The 403 was being caused by WPML triggering a mod_security rule (218500) from COMODO WAF: SQLmap attack detected, and that was blocking access and crashing the site for whoever triggered it.
We have whitelisted the website for this mod_security rule but it would perhaps be better if WPML didn't trigger it in the first place.