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: Compatibility
This topic contains 12 replies, has 3 voices.
Last updated by Nigel 1 year, 8 months ago.
Assisted by: Nigel.
Author | Posts |
---|---|
August 21, 2023 at 3:14 am #14259561 | |
brianD-22 |
Tell us what you are trying to do? I am running a site with Toolset, WPML, and BuddyPress. I recently completed a fair amount of string translation for BuddyPress. I am seeing a bug where, GIVEN that the WPML String Translation plugin is active, I get an unexpected 404 error when I: 1) browse to a BP page (in Irish), and 2) attempt to browse from the BP page back to a CPT archives page configured using Toolset. Once I clear the page cache from the Performance menu, the 404 page goes away and the desired page reappears. But, if I repeat the above two steps, it always comes back. If I deactivate the WPML String Translation plugin, I do not get the 404 page. Is there any documentation that you are following? N/A Is there a similar example that we can see? What is the link to your site? |
August 21, 2023 at 12:11 pm #14263725 | |
Alejandro WPML Supporter since 02/2018
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+02:00) |
Hello! I'll help you get started while a supporter takes your case. We have a known issue about String translation that is important to rule out here: https://wpml.org/errata/wordpress-6-3-performance-issues-with-string-translation-in-specific-scenarios/ In some cases, the crashes occur when the issue linked above is described. can you test if by any chance it's your case as well? Let us know so we can understand how to continue. |
August 21, 2023 at 1:13 pm #14264337 | |
brianD-22 |
Thank you, Alejandro. To test, I downloaded the plugin WP Downgrade on my staging site and set the core version for WordPress to 6.2.2. When I reactivate String Translations, I see the same error. I've down a fair amount of testing on my staging site. There appear to be multiple factors at play. For instance: * If I have the GamiPress plugin active, the frequency of 404 errors is much higher. When I deactivate GamiPress, it helps limit the scope of the error, but doesn't eliminate it entirely unless I also deactivate String Translations. * Curiously, if String Translations is inactive, I can reactivate GamiPress and it runs fine (with the exception, of course, that certain strings across the site aren't translated.) * If GamiPress is inactive and String Translations is active, there are specific, reproducible steps to demonstrate the error. When browsing the translated site, if I navigate to a BuddyPress page and then try to navigate back to a CPT archive page, I get the 404 error. I can dismiss the error by clearing the page cache using W3 Total Cache. Hope this helps! |
August 21, 2023 at 1:49 pm #14264713 | |
Nigel WPML Supporter since 02/2016 Timezone: Europe/Madrid (GMT+02:00) |
Hi Brian Let me take over here. Glad to see you are making progress with GaelQuest. I take it I need to be logged in so that I can navigate to a relevant BuddyPress page before I try to navigate back to an archive page, so can I get credentials from you to be able to do that? Also, am I to understand that if caching is disabled, the problem doesn't occur at all? I've set a private reply to get credentials from you. |
August 21, 2023 at 6:04 pm #14266343 | |
brianD-22 |
Another FYI: In production, I'm using the Pro version of W3 Total Cache and have the WPML extension enabled. |
August 22, 2023 at 11:15 am #14270391 | |
Nigel WPML Supporter since 02/2016 Timezone: Europe/Madrid (GMT+02:00) |
That is the strangest thing. I disabled caching, and redirection and custom 404 plugins to eliminate those, and I see the problem you describe, and what is particularly odd is that you get the same 404s even if you paste the correct URL into a new browser tab to navigate there directly (even into an Incognito tab). The only way to "fix" the issue appears to be to log out and back in again. The role of String Translation here relates to it being used to translate the CPT slug, and that is why it works when ST is disabled. I've sent this up to my colleagues in second tier to see what insights they may have. I'll get back to you when I know more. |
August 22, 2023 at 1:28 pm #14271651 | |
brianD-22 |
Thanks, Nigel. I'm glad it's not just me. I've really racked my brain trying to troubleshoot this. With W3 Total Cache enabled, I can at least clear the page cache using the Performance menu so that we don't have to log out. But, that doesn't work for my end users. It occurred to me that the translated CPT slugs could be related. As you talk to your colleagues and think about solutions, I'll share that I'm open to not translating the slugs if there's no other option. It's not my preference, but if simplifying the configuration allows me to put this one to bed quickly and get back to actual content creation, it's a worthy trade-off. Let me know either way. Thanks! |
August 22, 2023 at 2:51 pm #14272339 | |
Nigel WPML Supporter since 02/2016 Timezone: Europe/Madrid (GMT+02:00) |
I'm pleased to say that my colleague looked into your site and seems to have fixed the issue. In WPML > String Translation he noted there were two entries for the slug "explore". He deleted the string coming from Types, to leave only the slug recorded by WordPress, and that seems to have done the trick. It's quite an esoteric issue and I think we might take the win without worrying too much about the exact reasons why, if you agree. |
August 22, 2023 at 4:16 pm #14272847 | |
brianD-22 |
Thanks, Nigel. That's good news! I confirmed that the error is gone when I browse back to the "Taiscéal" page (Step 6 in my private message above.) However, I can still reproduce the error when browsing to the "Teagasc" (Learn) and "Glac Páirt" links, which also correspond to CPT archives. I suspect there are duplicate entries for "learn" and "play" as well. If you can describe the steps to find and eliminate the duplicates, I'm happy to apply the fix myself. Also, can you take a look at the possibly related issue I described above: There's one other curious detail I want to point out. If you browse to your profile page in BuddyPress (hidden link), you'll notice that the page title also reads 'What the devil?" which comes from the custom 404 page. Not sure why that's showing up or whether it's related to the main bug. It happens for both English and Irish. If it's not related, I can submit a separate issue (if you prefer.) Thanks again, |
August 23, 2023 at 8:12 am #14275483 | |
Nigel WPML Supporter since 02/2016 Timezone: Europe/Madrid (GMT+02:00) |
For the other problem slugs you can go to WPML > String Translation and search for the slug (the screenshot shows searching for "learn"). Where there are two entries, one from Types ("wpcf" domain), one from WordPress, delete the Types entry. As for the other issue, I've done some testing of different combinations of plugins, and it appears to relate to some interaction between WPML itself and the custom 404 plugin (probably because BuddyPress is "displaying" a post with ID = 0 at that point), but to properly debug it I'd need to take a copy of your site so that I can work on it locally. Would that be okay? |
August 23, 2023 at 8:31 am #14275807 | |
brianD-22 |
Yes, that would be okay. Thanks for the additional help. In the meantime, I'll take a look at those strings. |
August 23, 2023 at 9:04 am #14276189 | |
brianD-22 |
Nigel: Based on your description of the interaction between the custom 404 plugin and the profile page in BuddyPress, it occurs to me that this issue is probably not related to WPML. If this is a compatibility issue between those two plugins, it's probably not reasonable to expect your team to troubleshoot it for me. If you agree let me know and we can close this issue. I found the dupe strings on prod, deleted them, and everything is now working as expected. Thanks! |
August 24, 2023 at 11:03 am #14284261 | |
Nigel WPML Supporter since 02/2016 Timezone: Europe/Madrid (GMT+02:00) |
Hi Brian I took a look at the custom 404 page plugin code, and I see that they already include a WPML compatibility layer (along with compatibility code for other plugins) perhaps it would be best if you could contact them for support. In this particular context—the BuddyPress profile page while WPML is active—that plugin is wrongly identifying the page as a 404 and replacing the standard 404 template with its own. |
August 24, 2023 at 12:09 pm #14284693 | |
brianD-22 |
Thank you, Nigel! Really appreciate your help here. Beir bua! |