Page MenuHomePhabricator

reflinks.py ignores {{nobots}}
Open, LowestPublic

Description

The bot edits ( https://ru.wikipedia.org/w/index.php?title=%D0%94%D0%A0%D0%90%D0%9A%D0%9E%D0%9D&diff=68780497&oldid=68066759 ) the article despite the {{nobots}} template added to the end of the article.

Event Timeline

Rubin16 created this task.Feb 23 2015, 9:37 AM
Rubin16 raised the priority of this task from to Normal.
Rubin16 updated the task description. (Show Details)
Rubin16 added a project: Pywikibot.
Rubin16 added a subscriber: Rubin16.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptFeb 23 2015, 9:37 AM

Change 192706 had a related patch set uploaded (by Mpaa):
reflink.py: check if botMayEdit()

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

Mpaa added a subscriber: Mpaa.EditedFeb 24 2015, 10:30 PM

@jayvdb: Should something like BotMayEditBot be a subclass of Bot?

Mpaa added a subscriber: jayvdb.Feb 24 2015, 10:31 PM
XZise added a subscriber: XZise.Feb 25 2015, 12:09 AM

Hmm shouldn't save throw an exception if bots aren't allowed to edit?

Xqt added a subscriber: Xqt.Feb 25 2015, 6:39 AM

Yes, save should throw an exception and always check whether the edit is allowed. I thought this is already implemented. I guess in compat this works in that way.

Xqt added a comment.Feb 26 2015, 2:18 PM

This bug is invalid. There is no documented {{nobots}} with allow or deny arguments. See the documentation for the templates on de or en wiki.

Change 192706 abandoned by Mpaa:
page.py: fix Page.botMayEdit()

Reason:
Bug T90422 is not applicable.

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

XZise added a comment.Feb 26 2015, 7:19 PM

Are you sure? {{nobots}} on enwp redirects to bots, which allows the parameter. And why is this bug invalid? A bot shouldn't edit the page if there is a nobots template. It doesn't matter that exactly that bot is denied. Shouldn't it deny all bots anyway.

The Russian {{nobots}} btw does not redirect to bots.

Change 192706 restored by Mpaa:
page.py: fix Page.botMayEdit()

Reason:
Keep the test part.

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

I'll take up this microtask. :D

Xqt added a comment.Mar 7 2016, 5:54 AM

@darthbhyrava what is to claim here?

Xqt closed this task as Invalid.Mar 7 2016, 5:55 AM
jayvdb added a comment.EditedMar 7 2016, 6:06 AM

I dont understand why this is invalid. I think @XZise is correct in his earlier comment T90422#1070932

Xqt added a comment.Mar 7 2016, 6:09 AM

This is a redirect to the description page. {{nobots}} and {{bots}} doesn't have the same behaviour.

jayvdb reopened this task as Open.Mar 7 2016, 6:29 AM

I've reproduced the problem
https://test.wikipedia.org/w/index.php?title=User:John_Vandenberg/nobots&diff=263125&oldid=212560

If {{nobots|deny=...}} is not valid syntax, for nobots, then Pywikibot should fail either with a warning or an exception. It should not silently ignore syntax it does not understand.

Xqt added a comment.Mar 7 2016, 6:40 AM

I disagree. Bot's {{bots}}/{{nobots}} behaviour must reflect the common use of enabling/disabling bot edits. We should not introduce a new set of templates and parameters. Others would use other templates the bot does not understand. Vice versa is the right way. Users should read the documentation before they assume any bot directives.

jayvdb added a comment.Mar 7 2016, 6:51 AM
In T90422#2093544, @Xqt wrote:

I disagree. Bot's {{bots}}/{{nobots}} behaviour must reflect the common use of enabling/disabling bot edits. We should not introduce a new set of templates and parameters.

I agree. nobots with parameter deny should be considered unrecognised syntax/invalid/etc.

Others would use other templates the bot does not understand. Vice versa is the right way. Users should read the documentation before they assume any bot directives.

I dont understand your argument here. Templates that we dont understand are ignored.

However Pywikibot explicitly supports and implements nobots and bots. The users expect Pywikibot to do this. If Pywikibot encounters some unrecognised syntax in nobots and bots, Pywikibot must err on the side of caution; i.e. avoid editing the page. A very loud warning would be appropriate. We could also create a script that finds any pages using nobots/bots with unrecognised syntax and the script could fix the page syntax.

Xqt added a comment.Apr 14 2016, 8:28 AM

We could also create a script that finds any pages using nobots/bots with unrecognised syntax and the script could fix the page syntax.

We should start at ar-wiki. They try to localize that template. I am strongly against localizing bot directives. They must be a common template for all sites and projects. pywikibot is not the one and only bot framework. Ok we should have any exception handling when the template does not follow the syntax.

In addition pywikibot does not follow optout parameter for notification messages.

These improvements aren't reflinks related only.

Xqt added a subscriber: Meno25.Apr 14 2016, 8:29 AM
In T90422#2206201, @Xqt wrote:

We could also create a script that finds any pages using nobots/bots with unrecognised syntax and the script could fix the page syntax.

We should start at ar-wiki. They try to localize that template. I am strongly against localizing bot directives. They must be a common template for all sites and projects. pywikibot is not the one and only bot framework. Ok we should have any exception handling when the template does not follow the syntax.
In addition pywikibot does not follow optout parameter for notification messages.
These improvements aren't reflinks related only.

The template title on arwiki is localized to make it easier for users to add the template in the edit window. (It is hard to write LTR text mixed with RTL text in the edit window in a wiki whose content language is RTL such as arwiki.) Also, the local naming policy states that page titles should always be in Arabic (except for a very few cases). The arwiki bots template has no parameters.

Xqt added a comment.May 5 2016, 4:54 PM

@Meno25: Anyway I guess it's a bad idea because most bot's doesn't recognize. A better solution might be adding these templates to the tool bar for the local wiki.

Meno25 added a comment.May 5 2016, 5:29 PM
In T90422#2267593, @Xqt wrote:

@Meno25: Anyway I guess it's a bad idea because most bot's doesn't recognize. A better solution might be adding these templates to the tool bar for the local wiki.

Since you are a Pywikibot developer, then you know better. I will move the template to its standard English name and cite your message as reason.

Meno25 added a comment.May 5 2016, 5:32 PM
In T90422#2267593, @Xqt wrote:

@Meno25: Anyway I guess it's a bad idea because most bot's doesn't recognize. A better solution might be adding these templates to the tool bar for the local wiki.

Since you are a Pywikibot developer, then you know better. I will move the template to its standard English name and cite your message as reason.

Moved.

Xqt lowered the priority of this task from Normal to Lowest.Apr 25 2017, 8:43 AM
D3r1ck01 moved this task from Backlog to Needs Review on the Pywikibot board.Nov 5 2018, 11:37 AM