Page MenuHomePhabricator

When a main namespace page is saved that has an {{#assessment}} on it's talk page, the assessment data is deleted from the database
Closed, ResolvedPublic1 Estimated Story Points

Description

When a main namespace page is saved that has an {{#assessment}} on it's talk page, the assessment data is deleted from the database. The opposite is also true: When a talk namespace page is saved that has an {{#assessment}} on it's subject page, the assessment data is deleted from the database.

The reason for this is that when a page is saved, the LinksUpdateComplete hook only has access to the parser data for the actual page that was saved, not it's associated talk or subject page. So when the hook runs, if the page that was saved isn't the actual page that the assessment parser function is transcluded into, PageAssessments thinks that the article has no assessments, and thus deletes any existing assessments from the database for that page. In other words, it thinks that the assessments were removed from the article.

The only way to fix this is to require that either assessments are always transcluded on the talk page or they are always transcluded on the subject (main namespace) page. Since only the first option is practical on Wikipedias, that's the option we'll have to go with.

To implement this, we'll want to check that the page is a talk page in PageAssessmentsHooks::onLoadExtensionSchemaUpdates() and if it isn't, do nothing.

Event Timeline

kaldari triaged this task as High priority.Oct 12 2016, 1:03 AM
kaldari edited projects, added Community-Tech-Sprint; removed Community-Tech.
kaldari set the point value for this task to 1.

Change 315458 had a related patch set uploaded (by Kaldari):
Only update assessment data when talk pages are saved

https://gerrit.wikimedia.org/r/315458

Change 315458 merged by jenkins-bot:
Only update assessment data when talk pages are saved

https://gerrit.wikimedia.org/r/315458

kaldari claimed this task.
kaldari moved this task from Needs Review/Feedback to Q1 2018-19 on the Community-Tech-Sprint board.

Change 315843 had a related patch set uploaded (by Kaldari):
Only update assessment data when talk pages are saved

https://gerrit.wikimedia.org/r/315843

Change 315843 merged by jenkins-bot:
Only update assessment data when talk pages are saved

https://gerrit.wikimedia.org/r/315843

Change 315895 had a related patch set uploaded (by Kaldari):
Make the assessment namespace configurable

https://gerrit.wikimedia.org/r/315895

Change 315895 merged by jenkins-bot:
Make the assessment namespace configurable

https://gerrit.wikimedia.org/r/315895