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.

Tagged: 

This topic contains 20 replies, has 2 voices.

Last updated by gianfrancoa-3 1 year, 4 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
September 5, 2023 at 7:54 am #14340627

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates. I was able to access the site.

And surprisingly that Add to Cart AJAX operation seems to work fine, see my screen recording hidden link.

I've also attached a screenshot which I believe is the correct setting for this (it was already set).

I think it has something to do with the problem site running into 503 error, due to RankMath plugin. This is a WPML compatible plugin but there are several reported and unresolved issues, see https://wpml.org/documentation/plugins-compatibility/optimize-multilingual-websites-using-rank-math-and-wpml/#known-issues for details.

I'll advise to enable debugging (https://wpml.org/documentation/support/debugging-wpml/), then enable RankMath on your staging and try again. This should log any errors in the debug log file or in other server logs (i.e. php or webserver error logs).

I could do this but I am afraid I won't be able to access the site as we recently observed.

Please let me know your findings and I'll try my best to further help you on the matter.

add to cart.png
September 5, 2023 at 8:48 am #14341325

gianfrancoa-3

Hi, thank you very much for your help.

Ok, it seems the issue is related with Rank Math because when Rank Math is disabled the "Ajax add to cart" works for secondary language also.

But I'm not sure this issue is also related to the "503 error" I got on my staging enviroment; in my "production enviroment" I got no "503 error" but the "Ajax add to cart" still not works for secondary language. After enabling the debug, it seems the 503 error is caused by my staging enviroment low memory limit.

That said, I guess I could try to create another staging enviroment using a better hosting (so I can fix the memory limit issue), then we can check again the issue with Rank Math and Ajax add to cart for secondary language... what do you think?

I'll let you know as soon as the new staging anviroment is ready. Thank you for now!

September 5, 2023 at 12:22 pm #14344187

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your understanding.

Yes, sure please take your time and let me know when you are ready.

I've set your next reply as private again to share new staging credentials (if different than the current one).

September 7, 2023 at 7:00 am #14356289

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates.

I logged in successfully but as soon as I changed the language in user profile site ran into a 500 Internal Server Error. This means something isn't right which is breaking it altogether.

Can you please do the following?

- Deactivate all plugins.
- Switch to standard theme.

And then provide me also FTP access to the site (along with the wp-admin access you recently provided). So I'll then enable debugging, activate theme and plugins one by one. And if I run into an error I would know and fix via FTP and 'll move forward.

I've enabled your next reply as private again.

Screenshot 2023-09-07 115731.png
September 8, 2023 at 9:02 am #14364781

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for trying that and glad it finally worked.

I've just checked the staging, everything looks up to date and there are no errors as well. I could also add to cart successfully.

Perhaps there was some DB corruption which caused the problem. Although I had also tried those troubleshooting options. But probably activation/deactivation and updating the plugins also helped. This is a common thing when there are several plugins trying to use the same shared WP system.

I'll request to close this ticket as resolved since the issue has been resolved. And please feel free to open a new one anytime for anything WPML related.

Have a great weekend 🙂

September 8, 2023 at 11:14 am #14366247

gianfrancoa-3

Ok, I'm gonna mark this one as solved since in my staging website everything is working 🙂
Next week I'm gonna try to apply the same fix on my production website... if I'll have problems on the production site I'll open another support request.
Thanks again for your help!