Last modified: 2013-06-17 23:00:49 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 T51503, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49503 - Redirects to categories don't round-trip properly
Redirects to categories don't round-trip properly
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-12 22:59 UTC by Gabriel Wicke
Modified: 2013-06-17 23:00 UTC (History)
1 user (show)

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


Attachments

Description Gabriel Wicke 2013-06-12 22:59:20 UTC
echo '#redirect [[Category:Foo]]' | node parse --wt2wt | node parse --wt2wt
#redirect [[Category:Foo]][[Category:Foo]][[Category:Foo]]

It seems that the necessary special-case handing in the serializer is missing. If we assume that editors never insert categories in the middle of the DOM (currently true) then it should be safe to check for the previousSibling of the category link, and avoid serializing it if that is a redirect with the same target.
Comment 1 C. Scott Ananian 2013-06-17 22:20:24 UTC
Wasn't this a conscious design choice?
Comment 2 Gabriel Wicke 2013-06-17 22:40:02 UTC
Splitting #redirect [[Category:Foo]] into #redirect [[:Category:Foo]][[Category:Foo]] was (so that the VE can edit it). This *will* probably round-trip with selective serialization and is currently not an issue in production as the VE is not supporting editing of redirects at all.
Comment 3 Gerrit Notification Bot 2013-06-17 22:52:29 UTC
Related URL: https://gerrit.wikimedia.org/r/69258 (Gerrit Change Id1a79fe8366a9386191b919c2ce446fbf56d4863)
Comment 4 Gerrit Notification Bot 2013-06-17 22:59:32 UTC
https://gerrit.wikimedia.org/r/69258 (Gerrit Change Id1a79fe8366a9386191b919c2ce446fbf56d4863) | change APPROVED and MERGED [by jenkins-bot]

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


Navigation
Links