Module talk:Protected edit request

This is an old revision of this page, as edited by MSGJ (talk | contribs) at 12:52, 28 November 2013 (Protection detection: re). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 11 years ago by MSGJ in topic Protection detection

The {{edit protected}} and {{edit semi-protected}} templates used to set an anchor {{anchor|editprotected}} immediately before the box; this was useful because the lists at User:AnomieBOT/PERTable and User:AnomieBOT/SPERTable contain links to that anchor - see this edit, where the link [[Template talk:Infobox requested#editprotected|request]] is in the second added line. These links are now broken. I would fix it myself, but I can't find my way through the Lua code: there is something that looks like it's supposed to add an anchor, in the form of function box:exportAnchors, but I can't work out why that's not happening. --Redrose64 (talk) 14:07, 24 November 2013 (UTC)Reply

The anchors are working for me from User:AnomieBOT/PERTable and User:AnomieBOT/TPERTable. I changed the template on Template talk:Infobox requested from {{edit protected}} to the new {{edit template-protected}}, which will have caused links in the history of User:AnomieBOT/PERTable to stop working. If you use [[Template talk:Infobox requested#edittemplateprotected|request]] it should work. (Here's the link: request.) Are any of the anchors from the live PERTable lists not working, or is it just ones in the history? — Mr. Stradivarius ♪ talk ♪ 14:31, 24 November 2013 (UTC)Reply
Yes, they appear to be working now. --Redrose64 (talk) 16:37, 24 November 2013 (UTC)Reply

Protection detection

The module also attempts to detect the protection level of the pages used, and if any pages have a different protection level from the function specified it adds the page to Category:Wikipedia edit requests possibly using incorrect templates.

Instead of populating an error category, why not just choose the appropriate function based on the protection level? — Martin (MSGJ · talk) 19:17, 27 November 2013 (UTC)Reply

Because we can't do it accurately. The module can't detect when something is on the title blacklist, and it can't detect when a page is cascade-protected. It would put such pages into the category for whatever protection level is returned by {{PROTECTIONLEVEL}}, even though actually only admins can edit them (or template editors for the title blacklist). If this becomes possible to detect on the MediaWiki side then we should probably do as you suggest, and indeed this is how I wrote the code originally, so it would be trivial to switch it back and add the new protection detection. Having some pages categorised wrongly probably outweighs the benefits of being able to get the protection level for most pages, however. — Mr. Stradivarius ♪ talk ♪ 21:49, 27 November 2013 (UTC)Reply
The bot can accurately detect the protection level, so perhaps the best solution is to remerge the categories and leave the bot to update the two tables. Then editors will be able to use {{editprotected}} on both types, without having to worry about using the correct template. — Martin (MSGJ · talk) 10:51, 28 November 2013 (UTC)Reply
It's three tables now. Besides the long-established User:AnomieBOT/PERTable and User:AnomieBOT/SPERTable, User:AnomieBOT/TPERTable was set up a few days ago. --Redrose64 (talk) 11:37, 28 November 2013 (UTC)Reply
Yes, it was actually the PER and TPER tables that I was referring to (although it could apply to SPER as well.) I'm not seeing any advantages in having separate templates and separate categories for full- and template-protected pages. And in fact there are disadvantages because editors now have to choose between more templates and reviewers have to monitor more categories. So my proposal is to let the bot maintain the three tables but use a common template. — Martin (MSGJ · talk) 12:52, 28 November 2013 (UTC)Reply