autoblock parameter not working with action=block
Closed, ResolvedPublic

Description

Author: wikimedia-bugreports

Description:
It seems that the autoblock parameter in block requests does not work, at least not on german wikinews. I've sniffed my request and the autoblock parameter is clearly contained, but the resulting block always has autoblock deactivated.


Version: unspecified
Severity: normal

bzimport added a project: MediaWiki-API.Via ConduitNov 21 2014, 10:21 PM
bzimport set Reference to bz15486.
bzimport created this task.Via LegacySep 5 2008, 10:42 AM
Catrope added a comment.Via ConduitSep 5 2008, 2:44 PM

Does the API result have the autoblock flag set? As in

<block user="Bob" userID="147" expiry="20070906231113" reason="Time out" nocreate="" noemail="" autoblock="" />

bzimport added a comment.Via ConduitSep 5 2008, 2:51 PM

wikimedia-bugreports wrote:

Yes it has:

<block user="Kju (Test)" userID="2872" expiry="2008-09-05T15:48:41Z" reason="Test fuer Debugging durch Entwickler" nocreate="" autoblock="" />

But:

16:48 <@rc> [[Spezial:Log/block]] block * Kju * sperrte »[[Benutzer:Kju (Test)]]«

für den Zeitraum: 1 Stunde (Erstellung von Benutzerkonten gesperrt, 
Autoblock deaktiviert): Test fuer Debugging durch Entwickler

............^^^^^^^^^^^^^^^^^^^^^ (Autoblock deactivated)

One question unrelated to the problem: I notice that you have another format for the date time in your example. Is that configurable in the api request?

Catrope added a comment.Via ConduitSep 5 2008, 2:53 PM

(In reply to comment #2)

Yes it has:

<block user="Kju (Test)" userID="2872" expiry="2008-09-05T15:48:41Z"
reason="Test fuer Debugging durch Entwickler" nocreate="" autoblock="" />

But:

16:48 <@rc> [[Spezial:Log/block]] block * Kju * sperrte »[[Benutzer:Kju
(Test)]]«

für den Zeitraum: 1 Stunde (Erstellung von Benutzerkonten

gesperrt,

Autoblock deaktiviert): Test fuer Debugging durch Entwickler

............^^^^^^^^^^^^^^^^^^^^^ (Autoblock deactivated)

My guess would be that you're not allowed to autoblock people then. I'll look into the block code.

One question unrelated to the problem: I notice that you have another format
for the date time in your example. Is that configurable in the api request?

No, that's a bug. All API modules now use the ISO 8601 (2008-09-05T15:48:41Z) format.

bzimport added a comment.Via ConduitSep 5 2008, 2:57 PM

wikimedia-bugreports wrote:

When using the webinterface i am certainly allowed to autoblock people:

16:56 <@rc> [[Spezial:Log/block]] block * Kju * sperrte »[[Benutzer:Kju (Test)]]«

für den Zeitraum: 1min (Erstellung von Benutzerkonten gesperrt): manueller 
test
Catrope added a comment.Via ConduitSep 5 2008, 3:00 PM

(In reply to comment #4)

When using the webinterface i am certainly allowed to autoblock people:

16:56 <@rc> [[Spezial:Log/block]] block * Kju * sperrte »[[Benutzer:Kju
(Test)]]«

für den Zeitraum: 1min (Erstellung von Benutzerkonten gesperrt):

manueller

test

On which wiki is this?

bzimport added a comment.Via ConduitSep 5 2008, 3:03 PM

wikimedia-bugreports wrote:

(In reply to comment #5)

On which wiki is this?

dewikinews

Catrope added a comment.Via ConduitSep 5 2008, 3:06 PM

(In reply to comment #6)

(In reply to comment #5)
> On which wiki is this?

dewikinews

It turns out not to matter, as it was caused by misspelling "Autoblock" as "AutoBlock" in the API. Fixed in r40494.

bzimport added a comment.Via ConduitSep 5 2008, 3:17 PM

wikimedia-bugreports wrote:

I just want to thank you and state that i'm really impressed that you fixed the three bugs discovered by me (one yesterday, two today) in virtually no time. Thanks for the good work and thanks for making the API finally usable for all tasks script writers might need.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.