Last modified: 2013-07-25 07:06:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43765, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41765 - Autoedit changes unintended form field
Autoedit changes unintended form field
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized major (vote)
: ---
Assigned To: s7eph4n
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-04 13:58 UTC by Jamie Thingelstad
Modified: 2013-07-25 07:06 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jamie Thingelstad 2012-11-04 13:58:53 UTC
I've run across a nasty bug in Semantic Forms (2.5.1) while doing an autoedit via the API where the autoedit changes the first character of another Template field that was not part of the intended edit.

This is the autoedit command I'm executing (via python-simplemediawiki)

c = wiki.call({'action': 'sfautoedit', 'form': 'Book', 'target': title, 'Book[Cover]': 'Cover for ' + book['printouts']['Has Amazon ASIN'][0] + '.jpg'})

It is targeting this Form:

http://rwbookclub.com/wiki/Form:Book

The behavior is very odd. It does update the Book[Cover] field as intended, but it changes the value of any *dates* in the templates.

Here is an example diff:

http://rwbookclub.com/w/index.php?title=Wired_for_War:_The_Robotics_Revolution_and_Conflict_in_the_21st_Century&curid=884&diff=4584&oldid=4575

Note that "November" has been changed to "Povember" in all cases, including *other* templates.

It isn't always a P either, see this diff:

http://rwbookclub.com/w/index.php?title=Among_Others&curid=898&diff=4594&oldid=4592

"November" became "Aovember".
Comment 1 Yaron Koren 2012-11-04 15:05:42 UTC
Re-assigning to f.trott.
Comment 2 Jamie Thingelstad 2012-11-05 13:43:21 UTC
Additional information. I use this same autoedit capability on another wiki and had never seen this behavior with a timestamp being changed. So, I had a hunch. The only difference between those two forms was that this one had "restricted" set on the field that was getting changed.

So, I modified the form and removed "restricted" from the "Added on" field and this behavior went away.

http://rwbookclub.com/w/index.php?title=Fooled_by_Randomness%3A_The_Hidden_Role_of_Chance_in_Life_and_in_the_Markets&diff=4975&oldid=4973

Only happens with date fields that are set to restricted from what I can see.
Comment 3 Jamie Thingelstad 2012-11-05 13:44:25 UTC
Here is the diff on the form that made the bug go away:

http://rwbookclub.com/w/index.php?title=Form:Book&curid=269&diff=4964&oldid=4154
Comment 4 Jamie Thingelstad 2012-11-07 13:11:09 UTC
Moving from Critical to Major since this only happens if the field is set to restricted.
Comment 5 s7eph4n 2012-11-07 21:51:28 UTC
Fixed in https://gerrit.wikimedia.org/r/32313
Comment 6 Jamie Thingelstad 2013-02-04 21:03:07 UTC
This fix doesn't seem to have ever been committed back into the main release. I'm seeing the same problem again on another wiki using new code.
Comment 7 s7eph4n 2013-04-06 17:22:41 UTC
Is this still an issue with the latest dev version?
Comment 8 s7eph4n 2013-05-01 16:50:18 UTC
I think this should be fixed. Please re-open if this is still an issue.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links