Page MenuHomePhabricator

Page protection leads to issue in translatable pages
Closed, ResolvedPublic

Description

Observed on Meta-wiki's [[Terms of use]] page. After the page was protected, PT no longer saw the page as being a translatable page, and the to be translated version could not be updated until an actual content change was made in the page. On Special:PageTranslation it was shown in a seperate section, with only options to delete the translateble page. It did not appear to impact the possibility to translate the page.

Step to reproduce (most probably):

  1. create a translatable page and mark it for translation on Special:PageTranslation
  2. protect the page
  3. observe Special:PageTranslation. This will show the detailed unexpected behaviour.

Expected behaviour: page protection should now disrupt the "marking a revision for translation" on Special:PageTranslation.


Version: unspecified
Severity: normal
URL: https://www.mediawiki.org/wiki/Special:PageTranslation

Details

Reference
bz32983

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:02 AM
bzimport set Reference to bz32983.

Without investigating here is my theory: protecting a page makes a new revision in the page history. Since it is not an edit action the onPageSave hooks are not executed, and Translate does not see any info about this new revision, and thus thinks it is not a translatable page.

https://www.mediawiki.org/wiki/Special:PageTranslation now contains an example. "User:Nemo bis/Fréttinga" is classified in "Broken pages" but the only thing that happened is that the page was protected.

Reopening because this is not fixed on Wikimedia.

bumping to highest until it is fixed in prod.

I will need help to debug what is the real cause that Revision::getTitle returns null.

Initial suspicion is that due to slave lag getTitle returns null because it does another query instead of using/having that information already there.

  • Bug 36846 has been marked as a duplicate of this bug. ***

In my testing, I observed an identical situation that seemed to be caused by deleting the translations. After the translations were gone, there was no "mark this page for translation" link, even though the translation markup was still present. Making an edit to the page resolved the problem, which seems to match Niklas's guess in comment 1.

I found another bit of info in my notes, that I intended to use for my own bug report. Since this bug is already opened, I'll paste it here. After marking a page for translation, this error was reported:

Fatal error: Call to a member function initCollection() on a non-object in /path/to/extensions/Translate/tag/RenderJob.php on line 48

I hope that helps find the bug.

(In reply to comment #11)

In my testing, I observed an identical situation that seemed to be caused by
deleting the translations. After the translations were gone, there was no "mark
this page for translation" link, even though the translation markup was still
present. Making an edit to the page resolved the problem, which seems to match
Niklas's guess in comment 1.

Please explain what do you mean "deleting the translations".

The protection issue has been fixed. Pages no longer appear as "broken" on WMF if protected.