Module talk:Protected edit request
Broken links
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)
- 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)- Yes, they appear to be working now. --Redrose64 (talk) 16:37, 24 November 2013 (UTC)
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)
- 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)- 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)
- 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)
- 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)
- 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)
- 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)
- 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
Your suggestion would definitely be easier for most editors to understand, and I have already seen a fair few mistakes with the new protection templates. We would have to rethink the way we layout the categories to make them easy to access for patrollers at all permissions levels, but that's not such a bad thing in my opinion. Anomie, what do you think? — Mr. Stradivarius ♪ talk ♪ 04:20, 29 November 2013 (UTC)
- How is one template going to result in pages being in two different categories, so the bot can divide them into different tables? Anomie⚔ 16:06, 29 November 2013 (UTC)
- I think Martin is suggesting that you reprogram the bot so that it chooses which table to put a page in depending on the protection level it detects. So all the pages would be in the same category, and the bot would do the work of sorting them into tables by protection level. It's completely up to you whether you want to go through with it, of course. — Mr. Stradivarius ♪ talk ♪ 17:31, 29 November 2013 (UTC)
- Then where would the two tables be displayed? It would make more sense to me in that case to have one PER table but to color the template-protected rows differently (suggestions as to the coloring welcome). Anomie⚔ 20:29, 29 November 2013 (UTC)
- Yep, color coding would work as well. Having two separate tables and transcluding them both to the category might be slightly more flexible, because template editors might choose to tranclude it to their userpage or whatnot. I don't really mind, both would be an improvement on the current situation. — Martin (MSGJ · talk) 12:34, 2 December 2013 (UTC)
- Poke, Anomie. Any more thoughts on this? — Martin (MSGJ · talk) 12:51, 12 December 2013 (UTC)
- No new thoughts. Do we have a consensus on how exactly it should be changed? Anomie⚔ 14:19, 12 December 2013 (UTC)
- I don't we think we have consensus for any method yet. (Wish this could have been discussed before implementing though.) When I get some time I'll advertise this in a couple more places and see what others think. — Martin (MSGJ · talk) 20:23, 15 December 2013 (UTC)
- No new thoughts. Do we have a consensus on how exactly it should be changed? Anomie⚔ 14:19, 12 December 2013 (UTC)
- Poke, Anomie. Any more thoughts on this? — Martin (MSGJ · talk) 12:51, 12 December 2013 (UTC)
- Yep, color coding would work as well. Having two separate tables and transcluding them both to the category might be slightly more flexible, because template editors might choose to tranclude it to their userpage or whatnot. I don't really mind, both would be an improvement on the current situation. — Martin (MSGJ · talk) 12:34, 2 December 2013 (UTC)
- Then where would the two tables be displayed? It would make more sense to me in that case to have one PER table but to color the template-protected rows differently (suggestions as to the coloring welcome). Anomie⚔ 20:29, 29 November 2013 (UTC)
- I think Martin is suggesting that you reprogram the bot so that it chooses which table to put a page in depending on the protection level it detects. So all the pages would be in the same category, and the bot would do the work of sorting them into tables by protection level. It's completely up to you whether you want to go through with it, of course. — Mr. Stradivarius ♪ talk ♪ 17:31, 29 November 2013 (UTC)
Handle full URLs passed as pages to be edited
At [1], a full URL was given as a page to edit instead of just a page name. Would it be simple to make this change the URL back into a page name, or otherwise handle it? Currently, it leads to things like [2] happening, which isn't very pretty or accurate. @Mr. Stradivarius: ping. Jackmcbarn (talk) 22:57, 4 December 2013 (UTC)
- It's very rare, and we can't guard against every mistake - somebody will always do something unexpected. Just fix it when it happens, which I see was done (but there's still a whole slew of empty
<ref></ref>
causing a sea of red). --Redrose64 (talk) 23:18, 4 December 2013 (UTC)- In addition to being a rare error, it's also possible for a URL to be a valid page title (e.g. [3]). That kind of title is rare enough that it probably wouldn't matter (and would probably be moved then deleted under G6), but I think we should probably support all titles allowed by MediaWiki. That kind of page title breaks the double-square-bracket syntax though (see [[4]]). This means we'd have to update the bot to support them properly, but I'm not sure that it matters enough to fix. — Mr. Stradivarius ♪ talk ♪ 00:07, 5 December 2013 (UTC)
- Meh, I should fix the bot anyway. It is already applying the colon trick to File- and Category-namespace pages, but I forgot there are other cases. Anomie⚔ 02:03, 5 December 2013 (UTC)
- In addition to being a rare error, it's also possible for a URL to be a valid page title (e.g. [3]). That kind of title is rare enough that it probably wouldn't matter (and would probably be moved then deleted under G6), but I think we should probably support all titles allowed by MediaWiki. That kind of page title breaks the double-square-bracket syntax though (see [[4]]). This means we'd have to update the bot to support them properly, but I'm not sure that it matters enough to fix. — Mr. Stradivarius ♪ talk ♪ 00:07, 5 December 2013 (UTC)
last revision links
I tried to add a link for the last revision of the page and the last revision of the sandbox if it exists, but it doesn't seem to have worked... Can someone more familiar with Lua fix it and tell me what I missed so I can learn? @Theopolisme and Mr. Stradivarius: maybe? Technical 13 (talk) 20:51, 3 January 2014 (UTC)
- Your code's working fine - see [5]. Perhaps this was what you forgot? — Mr. Stradivarius ♪ talk ♪ 21:30, 3 January 2014 (UTC)
Fully detecting all forms of protection
A magic word to detect cascading protection is already merged and will be usable here soon. My next project is going to be to set up a magic word to detect titleblacklist protection. Once we have this, this module will be able to detect the protection level of all pages with 100% accuracy. At that point, will we be able to remove Category:Wikipedia edit requests possibly using incorrect templates and have it just automatically use the correct version of itself? Jackmcbarn (talk) 17:02, 7 January 2014 (UTC)
- That would be awesome. That's the conclusion that we came to above, and the module code will be able to handle it with minimal tweaking. The only reason the module isn't doing that right now is because it isn't currently technically possible. So, the answer to your question is a big "yes". :) — Mr. Stradivarius ♪ talk ♪ 17:09, 7 January 2014 (UTC)
- Okay, it's written and waiting for approval. gerrit:105979 Jackmcbarn (talk) 18:11, 7 January 2014 (UTC)