Last modified: 2014-06-13 09:48:18 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 T65638, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63638 - Do not overwrite content from community members/bots on re-upload
Do not overwrite content from community members/bots on re-upload
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GWToolset (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-07 16:18 UTC by dan
Modified: 2014-06-13 09:48 UTC (History)
5 users (show)

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


Attachments
sample dataset to be used for reproducing the error (21.52 KB, text/xml)
2014-04-30 04:40 UTC, dan
Details
mapping template to be used when reproducing the bug (678 bytes, application/json)
2014-04-30 04:41 UTC, dan
Details

Description dan 2014-04-07 16:18:18 UTC
the toolset currently allows batch updates that can potentially overwrite any added content to a mediafile’s file page. for example, if a bot or community member has added additional information, or corrected an error on a mediafile’s file page, another batch upload that contains alterations to the metadata or categories would overwrite that added content.
Comment 1 Gerrit Notification Bot 2014-04-07 16:28:03 UTC
Change 124347 had a related patch set uploaded by Dan-nl:
protect community member or bot added content

https://gerrit.wikimedia.org/r/124347
Comment 2 dan 2014-04-30 04:40:37 UTC
Created attachment 15247 [details]
sample dataset to be used for reproducing the error
Comment 3 dan 2014-04-30 04:41:21 UTC
Created attachment 15248 [details]
mapping template to be used when reproducing the bug
Comment 4 dan 2014-04-30 04:42:36 UTC
steps to reproduce
==================

login
-----
1. login to a local wiki instance that has GWToolset installed or into the beta 
    cluster, http://commons.wikimedia.beta.wmflabs.org/wiki/Special:GWToolset
2. go to step 1: metadata detection


step 1
------
1. nothing to add
2. Artwork
3. use the attached legermuseum.json file to create a mapping 
   GWToolset:Metadata_Mappings/YourUserName/legermuseum.json
   and enter that
4. nothing to add
5. select the attached legermuseum-sampe-11-records.xml file


step 2
------
1. click on the “Preview batch” button at the bottom of the page


step 3
------
1. click on the “Process the batch” button
2. if on a local wiki run the maintenance script runJobs.php unless you
   already have it running on a cronjob. note, you may need to 
   sudo -u www php maintenance/runJobs.php depending on local permissions


step 4
------
1. go to the Special:NewFiles page
2. select one of the 11 items that uploaded.
3. click on the edit or edit source link
4. in the artwork template change the object history line to
   | object history = testing overwrite of the wikitext
5. save the change
6. verify that the change is visible in the template
7. keep this page open


step 5
------
1. go through steps 1-3 again
2. notice the object history line in the template
3. refresh the page that you kept open
4. notice that the object history line no longer has the change you made
Comment 5 Gilles Dubuc 2014-05-05 09:49:23 UTC
I've tried following these steps locally, but on step 3 I get:

[90372859] /wiki/Special:GWToolset Exception from line 143 of /vagrant/mediawiki/extensions/GWToolset/includes/Handlers/Forms/MetadataMappingHandler.php: Please contact a developer. This issue must be addressed before you can continue. Please add the following text to your report:
</p><p>Could not create batch job for the metadata file.
Comment 6 dan 2014-05-08 01:23:11 UTC
the resolution of bug 64931 should take care of this exception. i rebased the patch, so if you’re working locally, you should be able to update the extension with the latest version of https://gerrit.wikimedia.org/r/#/c/124347/ and continue.
Comment 7 Gerrit Notification Bot 2014-05-09 07:33:25 UTC
Change 124347 merged by jenkins-bot:
Do not overwrite content from community members/bots on re-upload

https://gerrit.wikimedia.org/r/124347
Comment 8 Sam Reed (reedy) 2014-05-09 20:11:32 UTC
(In reply to Gilles Dubuc from comment #5)
> I've tried following these steps locally, but on step 3 I get:
> 
> [90372859] /wiki/Special:GWToolset Exception from line 143 of
> /vagrant/mediawiki/extensions/GWToolset/includes/Handlers/Forms/
> MetadataMappingHandler.php: Please contact a developer. This issue must be
> addressed before you can continue. Please add the following text to your
> report:
> </p><p>Could not create batch job for the metadata file.

2014-05-09 20:10:43 mw1013 commonswiki: [c408a967] [no req]   Exception from line 143 of /usr/local/apache/common-local/php-1.24wmf3/extensions/GWToolset/includes/Handlers/Forms/MetadataMappingHandler.php: Please contact a developer. This issue must be addressed before you can continue. Please add the following text to your report:
</p><p>Could not create batch job for the metadata file.
#0 /usr/local/apache/common-local/php-1.24wmf3/extensions/GWToolset/includes/Handlers/Forms/MetadataMappingHandler.php(451): GWToolset\Handlers\Forms\MetadataMappingHandler->createMetadataBatchJob(Array)
#1 /usr/local/apache/common-local/php-1.24wmf3/extensions/GWToolset/includes/Handlers/Forms/MetadataMappingHandler.php(549): GWToolset\Handlers\Forms\MetadataMappingHandler->processMetadata(Array)
#2 /usr/local/apache/common-local/php-1.24wmf3/extensions/GWToolset/includes/Jobs/UploadMetadataJob.php(55): GWToolset\Handlers\Forms\MetadataMappingHandler->processRequest(Array)
#3 /usr/local/apache/common-local/php-1.24wmf3/extensions/GWToolset/includes/Jobs/UploadMetadataJob.php(140): GWToolset\Jobs\UploadMetadataJob->processMetadata()
#4 /usr/local/apache/common-local/php-1.24wmf3/maintenance/runJobs.php(110): GWToolset\Jobs\UploadMetadataJob->run()
#5 /usr/local/apache/common-local/php-1.24wmf3/maintenance/doMaintenance.php(109): RunJobs->execute()
#6 /usr/local/apache/common-local/php-1.24wmf3/maintenance/runJobs.php(279): require_once('/usr/local/apac...')
#7 /usr/local/apache/common-local/multiversion/MWScript.php(97): require_once('/usr/local/apac...')
#8 {main}
Comment 9 dan 2014-05-10 06:04:50 UTC
thanks for posting the exception message. it should go away with the release of patch https://gerrit.wikimedia.org/r/#/c/131749/, which gergo took care of. the deploy is scheduled for tuesday, 13 may 2014 between 18:00–20:00 UTC with the release of https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf4#GWToolset.

we already have an email thread on the glamtools list about this issue: http://lists.wikimedia.org/pipermail/glamtools/2014-May/000133.html. i have sent this confirmation to the list and asked that no one uses the tool until after the deploy.
Comment 10 Andre Klapper 2014-06-10 11:34:45 UTC
The two patches mentioned here have been merged and deployed.
Can somebody elaborate what else is needed here?

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


Navigation
Links