Page MenuHomePhabricator

Diff blog returning error for non-english articles
Closed, ResolvedPublicBUG REPORT

Description

It seems that many articles on diff are returning errors right now if they are not English ?

This is a published French language post, but returns an error.
https://diff.wikimedia.org/fr/2023/09/20/wikiconvention-francophone-a-abidjan-un-moment-historique/

I'm not very familiar with how diff translations etc work, but its almost as if all non-english links are broken ?

Event Timeline

Again out of order this morning (ok yesterday). It is important since the posts contain links towards the different activities and events. Consequently these last can no longer be reached if Url has not been saved before.
Notice in the dashboard All Posts, that this occurs when View the Published items .
Non published items Preview leads to a correct display of the draft contents even when in FRench.

Yeah, this is a frustrating situation. Our patch we deployed yesterday hit a snag, but we're addressing the issue and will have a solution eventually.

A little background if you're curious. WordPress uses rewrite rules to modify the URL for posts and pages. There's a setting to make "pretty permalinks" so that you have something like /2023/06/09/post-title-goes-here.

We also have an multilingual plugin that adds a language code to that URL, so /pt/2023/06/09/post-title-goes-here-but-in-portuguese

We haven't made any changes to the site, which makes me suspicious that something changed on our hosting platform, WordPress VIP. Now the site keeps forgetting its rewrite rules and drops the language code and gives 404 errors for non-English posts. We have a three way Spider-Man pointing meme situation. The plugin developers think it's a conflict with another plugin (it's not, we disabled all plugins on our test environment, same issue) or with our hosting, our hosting provider thinks it's something we've configured, and our development partners are trying to figure out where and why this is happening. Their approach so far is to write a plugin to do the following.

  • On 404, look for a rule in the registered rewrites that looks like a polylang URL for a single post (has a lang= and name= attribute).
  • If no such rule is found, delete the rewrite_rules option and its cached representation.
  • Rewrites get regenerated on the next request (deleting them == flushing them, but the also-delete-in-cache step seems to matter).

I don't want to say "we'll have a fix soon", but we are making progress. Thanks for the report and I hope this was a little illuminating. As of this post, the site is loading pages and RSS as expected.

Note, it also messes with the RSS feed too. 😦 T345512

We have our plugin in production. This should resolve the issue. I'm not going to resolve this until I can be sure, but adding a note here for transparency.

CKoerner_WMF claimed this task.

Ok, I met with our developers earlier this week and now can confirm that this is holding. Resolving this issue as our plugin is working as intended.