Page MenuHomePhabricator

3rd party wiki's with $wgMFAnonymousEditing enabled are not allowed to edit
Closed, InvalidPublic

Description

Anons don't have edit counts or even a username.

Patch incoming.


Version: unspecified
Severity: enhancement

Details

Reference
bz56833

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:24 AM
bzimport set Reference to bz56833.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1386

Change 94487 had a related patch set uploaded by Legoktm:
Make MobileWebEditing logging code support anons

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

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1387

I'm confused. you can't edit anonymously so why would this work.

If you set $wgMFAnonymousEditing = true, anonymous users should be able to edit.

yes.. but this is never set and only there for 3rd party wikis... the point of event logging is to track editing on wikimedia projects not 3rd party installs...

I don't understand your objection to this bug.

There's an issue preventing $wgMFAnonymousEditing from working properly if EventLogging is installed. It's a simple 5 line fix that I've already submitted.

The eventual goal is to fix bug 53069 so anonymous editing will be enabled for WMF sites per [[m:Founding principles]]. This is a clear blocker since WMF sites do run EventLogging.

This is a bug, not an enhancement request because anonymous users cannot save pages due to EL throwing an error.

Well then the bug should be "3rd party wiki's with $wgMFAnonymousEditing enabled are not allowed to edit".

I thought you were requesting the enabling of EventLogging for anonymous users. Whether this is desired is /not/ clear and is definitely an enhancement request.

A better solution would be not to fire an event at all...

(In reply to comment #8)

Well then the bug should be "3rd party wiki's with $wgMFAnonymousEditing
enabled are not allowed to edit".

Uh, no. That's not the issue.

The issue is that if $wgMFAnonymousEditing is enabled, and EventLogging is installed, it tries to log with a username of null and a null editcount, which EL rejects since the type is wrong, and prevents the user from editing.

My initial bug report was skimpy, and that's my fault.

I thought you were requesting the enabling of EventLogging for anonymous
users.
Whether this is desired is /not/ clear and is definitely an enhancement
request.

The current code already attempts to log events for anonymous editing.

The first solution I came up with was to just not log those fields, so anonymous edits are still logged, just without a username and edit count.

A better solution would be not to fire an event at all...

Disabling logging of anonymous edits would also fix this bug, but it seems a lot more heavy handed then my solution of logging some of the data.

To be clear an EventLogging validation error doesn't stop the edit itself...

After reading this some more I'm now even more convinced this is not a 'bug'. With $wgMFAnonymousEditing enabled and EventLogging installed, the edit will still go through (thanks to your other patch) however will log a validation error against the schema (which is not a big deal)

The user is not prevented from editing at all.

When enabling anonymous editing we should definitely re-think logging - whether we do it or not and what we need to log in those situations (we may need to add a field anonymous editor for example) - but doing so now seems overly premature and I would expect it to be done as part of that development. If you feel a bug for this is important please open a new bug to avoid more confusion in this one.

Change 94487 abandoned by Legoktm:
Make MobileWebEditing logging code support anons

Reason:
AFAIK, there is no 'required': true set for those fields in the Schema, so it should log properly.

Regardless, abandoning per bug.

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

(In reply to comment #11)

After reading this some more I'm now even more convinced this is not a 'bug'.
With $wgMFAnonymousEditing enabled and EventLogging installed, the edit will
still go through (thanks to your other patch) however will log a validation
error against the schema (which is not a big deal)

Right, I realized that I was working on two separate branches so the error I thought I saw here was actually the other bug.

When enabling anonymous editing we should definitely re-think logging -
whether
we do it or not and what we need to log in those situations (we may need to
add
a field anonymous editor for example) - but doing so now seems overly
premature
and I would expect it to be done as part of that development.

Agreed. Thanks for discussing.

And thanks for poking at the code and highlighting these problems. Very much appreciated (I know that can sometimes be lost in text based communications!)