Last modified: 2014-02-12 23:38:14 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 T24594, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22594 - Bugs in MetadataEdit extension
Bugs in MetadataEdit extension
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
MetadataEdit (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Alexandre Emsenhuber [IAlex]
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-20 17:12 UTC by Alexandre Emsenhuber [IAlex]
Modified: 2014-02-12 23:38 UTC (History)
3 users (show)

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


Attachments

Description Alexandre Emsenhuber [IAlex] 2010-02-20 17:12:50 UTC
+++ This bug was initially created as a clone of Bug #8790 +++

I have discovered a number of bugs in the $wgUseMetadataEdit code:

- "show changes" on the edit page does not include the metadata

- metadata edits can be lost or misordered during section edits
  - the current code will simply stuff the new/edited metadata into 
    the end of the section being edited, while leaving any existing
    metadata at the end of the article.

- the parser that extracts metadata appears to have a condition that
  can cause the loss of content from previous revisions.
  - i did not actually experience this bug, but in trying to understand 
    how the parser works, i discovered that it sometimes fails to 
    un-explode the content, which could in theory replace text with "Array"
    in the articles.  Look for the "$y = implode("]]", $y)" on line 70 of
    my patch.

- metadata ordering can change between normal edits, which makes
  history diffs messy.
  1. edit the page.  add a new whitelist metadata field to the 
     normal textbox.  save the page.  Note in the source of the new
     revision that your metadata is still in the middle of the article
     content.
  2. edit the page again.  add some new content in the normal textbox.
     save the page.  Note that the source of the new revision now has
     the metadata from step 1 located at the end of the text, rather
     than in the middle of it.

I believe that I have fixed these bugs, and I will attach the patch in
a moment.  The patch also includes two new hooks, which allow
an extension to replace both the metadata parser and the metadata 
textbox on the EditPage.  I believe that this patch will have zero 
impact on any installations that are not using $wgUseMetaDataEdit.
Comment 1 Siebrand Mazeland 2010-04-20 23:10:54 UTC
Remove patch/need-review, as no patch was attached. Keeping issue open, as the report is probably valid. Assigning to reporter.

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


Navigation
Links