Skip Navigation

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

Problem:
After launching a new site, switching from English to French with BuddyPress activated causes a 404 error or a blank page. The issue is related to object caching with Redis.
Solution:
We recommend the following workaround:
1. Ensure you have a complete backup of your site.
2. Access your site's files.
3. Navigate to the

/wp-content/

folder and create a

mu-plugins

folder if it doesn't exist.
4. Inside the

mu-plugins

folder, create a PHP file named

wpml-non-persistent-cache.php

(or any name you prefer).
5. Insert the following code into that file:

<?php
/**
 * Plugin Name: WPML Non-Persistent Cache
 * Description: A plugin to prevent persistent caching issues (temporary issue: compdev-220).
 * Author: OnTheGoSystems
 * Author URI: https://wpml.org/errata/problems-with-buddypress-multilingual-and-redis-object-cache/
 * Version: 1.0.0
 * Plugin Slug: compdev-220
 */

wp_cache_add_non_persistent_groups( [
	'convert_url',
	'element_translations',
	'get_pages_adjust_ids',
	'get_user_admin_language',
	'translation_priority_relationships',
	'translationmanagement--get_translation_job_id',
	'wpml_cache_terms_per_lang',
	'wpml_endpoints_support',
	'wpml_pre_option_page',
	'wpml_register_string_filter',
	'wpml_register_string_filter--facetwp',
	'wpml_slug_translation_records--post',
	'wpml_slug_translation_records--taxonomy',
	'wpml_st_cache',
	'wpml_term_translation',
	'wpml_tm_blog_translators--has_translators',
	'wpml_wp_cache__group_keys',
	'bp_pages',
] );

This temporary plugin should resolve the issue while we work on a definitive solution. Please try this workaround and let us know the results.

If this solution does not seem relevant to your situation, please open a new support ticket with us.

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.

This topic contains 12 replies, has 2 voices.

Last updated by Mateus Getulio 1 year, 3 months ago.

Assisted by: Mateus Getulio.

Author Posts
October 31, 2023 at 1:04 pm

joshuaM-19

We've just launched our new site and running into a couple of issues where the switch from English to French is either causing a 404 error or a blank page - both issues are with Buddypress

October 31, 2023 at 2:10 pm
October 31, 2023 at 2:13 pm #14700787

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi Darryl,

As we discussed on the chat, please let us know if it is possible to have a website package and migrate it into our servers.

Looking forward to your reply. Thank you.

October 31, 2023 at 5:09 pm #14702627

joshuaM-19

Hi - we have approval. Please go ahead and copy the site and let us know when it's resolved.

October 31, 2023 at 7:13 pm #14703371

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello again,

Thanks for the confirmation.

I have double-checked the problem, but so far I haven't been able to find a fix. I asked my colleagues to take a look to see if there's anything I'm missing.

For your information, just out of curiosity, the problem does not seem to happen in a copy version: hidden link. Right now I am checking internally if this could be a server issue.

If you want to test it yourself, the credentials are the same as in the original website. I also would suggest that your team try to migrate the website to a local server and see if the problem happens there.

Regardless, I'll come back here as soon as one of them answers me (which shouldn't take long). Thank you in advance for your patience!

Regards,
Mateus.

October 31, 2023 at 7:28 pm #14703433

joshuaM-19

Thanks Mateus,

Yes testing your link and it seems to work fine. Not sure how that's possible if it's a direct copy of the website. I'll wait to hear back from you with your findings.

So strange...would this have anything to do with the switch from the cloudways url to catca.ca?

Darryl

November 1, 2023 at 1:15 pm #14707793

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi Darryl,

Thanks for your patience.

As mentioned previously, we suspect it might be a server side issue or something specific to your installation. By chance, would you have a staging version of the website, where we could make more complex tests, like disabling all plugins except the needed ones? We would check as well a possible issue with the .htaccess file.

Please let us know if you have a staging website, or if it is possible to create it. I am marking your next response as private, so that you can enter the login info for it.

Looking forward to your reply. Thank you.

November 1, 2023 at 2:41 pm
November 2, 2023 at 1:26 pm #14717143

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

I have escalated this ticket to our 2nd tier of support where our 2nd tier specialists will take a deeper look at this issue and will try to find a solution.

I will get back to you as soon as I get an answer from them.

Best regards,
Mateus

November 2, 2023 at 1:49 pm #14717371

joshuaM-19

Ok thank you. Hopefully this can get sorted out.

November 7, 2023 at 6:39 pm #14751089

joshuaM-19

Hi - following up on this ticket. We haven't heard anything back in 6 days - can you please advise? Thanks

November 7, 2023 at 8:56 pm #14751697

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello Darryl,

Thanks for your patience, and sorry about the late response.

The redis plugin loaded in the mu-plugins folder was not working for us, and this was the reason why we couldn't replicate the issue in a different server.

We had to deploy another plugin, so that Redis cache is enabled, and this way we could see the issue. So the problem is the object caching.

It is very similar to https://wpml.org/errata/problems-with-buddypress-multilingual-and-redis-object-cache/. Right now our compatibility team is evaluating the next steps on how to deal with this issue.

In the meantime, we have a workaround for you. Please follow these steps:

- Make sure to have a complete backup
- Get access to your files
- Go to /wp-content/ folder on the site and create a folder named mu-plugins if there is not one already
- Inside the mu-plugins folder create a PHP file named "wpml-non-persistent-cache.php", or any name you want, and place the following code on it:

<?php
/**
 * Plugin Name: WPML Non-Persistent Cache
 * Description: A plugin to prevent persistent caching issues (temporary issue: compdev-220).
 * Author: OnTheGoSystems
 * Author URI: https://wpml.org/errata/problems-with-buddypress-multilingual-and-redis-object-cache/
 * Version: 1.0.0
 * Plugin Slug: compdev-220
 */

wp_cache_add_non_persistent_groups( [
	'convert_url',
	'element_translations',
	'get_pages_adjust_ids',
	'get_user_admin_language',
	'translation_priority_relationships',
	'translationmanagement--get_translation_job_id',
	'wpml_cache_terms_per_lang',
	'wpml_endpoints_support',
	'wpml_pre_option_page',
	'wpml_register_string_filter',
	'wpml_register_string_filter--facetwp',
	'wpml_slug_translation_records--post',
	'wpml_slug_translation_records--taxonomy',
	'wpml_st_cache',
	'wpml_term_translation',
	'wpml_tm_blog_translators--has_translators',
	'wpml_wp_cache__group_keys',
	'bp_pages',
] );

This plugin should fix the issue while we do not have a definitive solution. Please give it a try and let us know how it goes.

Thanks again for your understanding and patience.

November 8, 2023 at 3:54 pm #14758851

joshuaM-19

Hi Mateus - thank you for that and we will try the code today. Question for you - could we not just disable the object cache that is within Cloudways. Is it necessary to have installed?

Again, thank you so much for a solution. It's greatly appreciated.

November 8, 2023 at 4:05 pm #14758895

joshuaM-19

after all that investigation on your end, all that I had to do was flush and turn off the object cache plugin on the main dashboard in the admin panel and it's now working correctly. lol.

Thank you so much for the support!

November 8, 2023 at 6:46 pm #14760575

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi Darryl,

If you're ok with this option, then yes, this could be an alternative solution. I'm glad that you were able to resolve this.

In this case, and if you do not have further questions, I hope we are good to close here.

Feel free to contact us any time if you need assistance with our products.

Kind regards,
Mateus.