Menu

#106 Nobots detection prohibits editing even if nobots is commented out or inside nowiki tags

closed-wont-fix
nobots (1)
2015-05-04
2015-05-04
UserB
No

I received an exception that "page is prohibited by "nobots" or "bots|allow=none" template" when attempting to edit a page that only used nobots inside of <nowiki> ... </nowiki> tags.

If someone uses the bots or nobots template inside of ... , <nowiki> ... </nowiki>,

 ... 
, or HTML comments, then it should be ignored.

I also treat {{deceased wikipedian}} just like a {{nobots}}.

I am not very good at all with regex, so I am sure someone who knows what they are doing could do a better job of this, but I built my own function (source at https://en.wikipedia.org/wiki/User:B-bot/source ) that you are welcome to use or adapt for a future version of your framework.

Someone who knows Regex might be able to combine all of my rules together and do this whole thing in a few lines of code.

Discussion

  • CodeDriller

    CodeDriller - 2015-05-04

    You're probably right, commented out templates should be ignored. But at the moment finding and stripping all the comments and formatting tags is what I would prefer not to do before saving every page. It's too much processor work for such rare situations. May be sometimes later.

     
  • CodeDriller

    CodeDriller - 2015-05-04
    • status: open --> closed-wont-fix
    • assigned_to: CodeDriller
     
  • UserB

    UserB - 2015-05-04

    As an alternative, would you consider adding a property "ignorenobots" or an event CanEditPage that the consumer can handle with their own nobots check? I have just commented out the relevant code in the Save function and then I call my own code before even calling Save ... though I'm not thrilled with custom changes to the library for obvious reasons (being cut off from upgrades, etc)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.