We have just released WPML 4.3.3. Before reporting issues please make sure to update - this version resolves all known issues with the major WPML 4.3 release

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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

Last updated by Fernando 1 year, 3 months ago.

Assigned support staff: Otto.

Author Posts
July 25, 2018 at 11:25 pm

Fernando

I am trying to: sync the menus

Link to a page where the issue can be seen: n/a

I expected to see: the synchronisation options

Instead, I got: error 403

I already deactivated all plugins and used the default theme and tried again without success. Is there something I am missing?

July 26, 2018 at 12:35 pm #2584128

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I deployed your site locally and it worked for me, just out of the box.

I created a new user when cloning the site.

So I think it may be a permissions issue or a server configuration problem.

❌ Before proceeding please make a full website backup! ❌

To test if it is the first case, add the following in your theme's funcions.php file:


function wpmlsupp_1706_reset_wpml_capabilities() {
    if ( function_exists( 'icl_enable_capabilities' ) ) {
        icl_enable_capabilities();
    }
}
add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );

Visit the front end and then remove the code.

Check if the sync problem persists.

Let me know your results, please.

Kind regards,

Otto

July 27, 2018 at 2:14 pm #2588615

Fernando

Hello Otto,

Thanks but the problem persists.

What would be the web configuration problem ?

July 27, 2018 at 2:34 pm #2588630

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Please try creating a new admin user and check if the issue persists.

If it does, it may be something in the server. Can you please check that with your hosting provider?

As mentioned, it worked fine out of the box on my local environment. If needed I can create a test site to clone the site there so we can check it there.

Let me know your results, please.

Kind regards,

Otto

July 27, 2018 at 2:49 pm #2588650

Fernando

Hi Otto,

I have created a new user and the error is still there. What should ask the hosting provider, to verify the permissions of the wordpress files ?

Thanks

July 27, 2018 at 2:55 pm #2588656

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thank you.

Yes please, ask them why that URL is Forbidden for WP.

Another thing that may be happening is that this solution:
https://wpml.org/forums/topic/error-403-after-trying-to-sync-menu-in-3-languages/#post-2584128

is not taking effect because of the cache.

Can you try it again, but before visiting the front end, empty the cache, please.

Let me know what they say and we will move forward from there.

Kind regards,

Otto

July 27, 2018 at 3:08 pm #2588710

Fernando

Ok, I will contact the hosting provider.

But let me explain something first, I am able to go to the page, the 403 error comes after I click the button to synchronize the menus.

I notice there is a unicode limit notification in WPML information (see attached), do you think that has something to do with the problem? or is a performance issue?

Thanks for your help.

Edit: I did the steps mentioned : erasing the cache, adding the code to functions.php without success.

July 27, 2018 at 3:33 pm #2588830

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Yes, I also clicked on the button to synchronize the button locally. And it worked 🙁

I am not sure, because a Forbidden error is related to permission. I think if the problem was the error should be different.

Anyway, it would be good if you can provide me the WordPress debug.log (not WPML debug information).

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );

In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

If you can paste your debug.log to pastebin.com and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess in the discussion).

Is it OK if I clone the site on our servers so you can check it there too?

Kind regards,

Otto

August 2, 2018 at 3:10 pm #2605889

Fernando

Hello Otto,

I am unable to get the debug.log file; but in the web server log I got this when I get the error 403 :

[Thu Aug 02 11:05:02 2018] [error] [client 70.80.130.66] ModSecurity: Access denied with code 403 (phase 2). String match "on" at TX:sql_injection_score_blocking. [file "/etc/httpd/modsecurity.d/modsecurity_crs_49_inbound_blocking.conf"] [line "69"] [id "4049002"] [msg "Anomaly Score Summary (General: 0/5, Nexcess_Custom: 0/5, SQLi=60/15, XSS=0/30)"] [severity "CRITICAL"] [hostname "www.clccanada.org"] [uri "/wp-admin/admin.php"] [unique_id "W2MdnMBANIkAABE4ffMAAAAQ"]
[Thu Aug 02 11:04:56 2018] [error] [client 70.80.130.66] ModSecurity: Access denied with code 403 (phase 2). String match "on" at TX:sql_injection_score_blocking. [file "/etc/httpd/modsecurity.d/modsecurity_crs_49_inbound_blocking.conf"] [line "69"] [id "4049002"] [msg "Anomaly Score Summary (General: 0/5, Nexcess_Custom: 0/5, SQLi=60/15, XSS=0/30)"] [severity "CRITICAL"] [hostname "www.clccanada.org"] [uri "/wp-admin/admin.php"] [unique_id "W2MdlsBANIkAABE4ffEAAAAQ"]
[Thu Aug 02 11:03:07 2018] [error] [client 70.80.130.66] ModSecurity: Access denied with code 403 (phase 2). String match "on" at TX:sql_injection_score_blocking. [file "/etc/httpd/modsecurity.d/modsecurity_crs_49_inbound_blocking.conf"] [line "69"] [id "4049002"] [msg "Anomaly Score Summary (General: 0/5, Nexcess_Custom: 0/5, SQLi=60/15, XSS=0/30)"] [severity "CRITICAL"] [hostname "www.clccanada.org"] [uri "/wp-admin/admin.php"] [unique_id "W2MdKcBANIkAABUerlgAAAAh"]

It seems that the menu sync procedure is framed as a sql injection by the server.

What do you think

August 2, 2018 at 5:15 pm #2606389

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I am not sure why is that. It may be a false positive in the server. Is it possible to ask for more details to your hosting?

As mentioned I tested locally and it worked. I can also deploy your site on our servers to test it there. Is this OK for you?

Kind regards,

Otto

August 2, 2018 at 8:19 pm #2606963

Fernando

Hello Otto, The hosting provider has added a whitelist to the ModSecurity rule that blocked wpml and now the site works as expected. Thanks for your help