Page MenuHomePhabricator

Protecting action doesn't update page links
Open, LowestPublic

Description

If the page contains some {{PROTECTIONLEVEL:}} calls and some links depend on them, the link tables are not updated when the output of the call changes.

This dependency could be in several forms, including:

  • A link that includes the output of the call within it, such as [[Category:{{PROTECTIONLEVEL:edit}}]]
  • A link generated based on an if statement from Extension:ParserFunctions

Version: 1.20.x
Severity: normal

Details

Reference
bz34039

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:10 AM
bzimport set Reference to bz34039.
bzimport added a subscriber: Unknown Object (MLST).

Refresh jobs generated by changing page protection, fun.

Then hooks or whatever could just initiate a refresh job for something like ( 'protection', 475 ) when the protection level of page_id = 475 was changed and any pages that used something like that would be refreshed.

Due to fix of bug 17970, this should get a higher importance.

Probably changing page protection should just call WikiPage::doEditUpdates()?

Or WikiPage::doUpdateRestrictions() should clear some caches itself.

I would like to work on this. I am new to wikimedia development. Can anybody guide me in fixing this?

Hey! I am new here and needed some guidance on fixing this.
I am a little confused here... What exactly do you mean by "some links depend on them"? And which table exactly needs to be updated? An example would be helpful. :)

I'm not sure if this was the exact case that was originally being pointed out, but I reproduced this bug by doing the following:

  • Installed Extension:ParserFunctions
  • Created a new page (not protected)
  • Put an if statement in the new page: {{#if: {{PROTECTIONLEVEL:edit}} | http://somelink.com | nothing }}, which displayed "nothing" since there was no protection level
  • Checked in the externallinks table, there was no entry for http://somelink.com.
  • Protected the page, the if statement then displayed http://somelink.com.
  • The externallinks table was still not updated, but should have been.

The issue almost certainly extends to the other link tables too. I don't know whether the if statement is the only way to make a link depend on the protection level, though.

Hope this helps. :)

polybuildr set Security to None.
polybuildr updated the task description. (Show Details)
Ammarpad lowered the priority of this task from High to Lowest.Nov 18 2019, 6:38 AM