Last modified: 2013-07-25 07:06:31 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".
Re-assigning to f.trott.
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.
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
Moving from Critical to Major since this only happens if the field is set to restricted.
Fixed in https://gerrit.wikimedia.org/r/32313
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.
Is this still an issue with the latest dev version?
I think this should be fixed. Please re-open if this is still an issue.