Last modified: 2014-02-27 21:40:13 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 T63862, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61862 - VisualEditor: Place redirects at the top of the page, not the bottom
VisualEditor: Place redirects at the top of the page, not the bottom
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal trivial
: VE-deploy-2014-02-27
Assigned To: James Forrester
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-24 19:35 UTC by WhatamIdoing
Modified: 2014-02-27 21:40 UTC (History)
5 users (show)

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


Attachments

Description WhatamIdoing 2014-02-24 19:35:38 UTC
The proper order is #REDIRECT[[Whatever]], then categories and other stuff.  If you place the redirect anywhere other than the very top of the page, it won't work.
Comment 1 James Forrester 2014-02-24 19:38:13 UTC
Logically, Parsoid should decide where in the page such things go (right now it just renders in place); VisualEditor could hack around this by putting it at the top of the HTML, but that's not a scalable fix (and will likely break other things).

Parsoid, what do you think?
Comment 2 WhatamIdoing 2014-02-24 21:03:46 UTC
If "rendering in place" means "where the cursor is", then that's not happening.  It's placing the redirect at the bottom of the page even if your cursor is at the top or in the middle.
Comment 3 Gerrit Notification Bot 2014-02-24 21:09:21 UTC
Change 115287 had a related patch set uploaded by Jforrester:
Always try to put redirects at index 0, offset 0

https://gerrit.wikimedia.org/r/115287
Comment 4 James Forrester 2014-02-24 21:18:40 UTC
(In reply to WhatamIdoing from comment #2)
> If "rendering in place" means "where the cursor is", then that's not
> happening.  It's placing the redirect at the bottom of the page even if your
> cursor is at the top or in the middle.

No, it's rendering "in place" in the HTML document; VE just puts meta-items at the end of the HTML string (because internal logic of what MW's parser does and doesn't prefer is a decision for Parsoid), so Parsoid renders this at the end of the wikitext, which helpfully doesn't work.

(In reply to Gerrit Notification Bot from comment #3)
> Change 115287 had a related patch set uploaded by Jforrester:
> Always try to put redirects at index 0, offset 0
> 
> https://gerrit.wikimedia.org/r/115287

This is a hack to make VE try to insert it right at the top, which may not work in all cases but at least should patch over the issue.
Comment 5 Gerrit Notification Bot 2014-02-24 22:08:45 UTC
Change 115309 had a related patch set uploaded by Catrope:
Always try to put redirects at index 0, offset 0

https://gerrit.wikimedia.org/r/115309
Comment 6 Gerrit Notification Bot 2014-02-24 22:10:19 UTC
Change 115287 merged by jenkins-bot:
Always try to put redirects at index 0, offset 0

https://gerrit.wikimedia.org/r/115287
Comment 7 Gabriel Wicke 2014-02-24 22:14:07 UTC
Moving back to VE; Position of inline metadata is the client's responsibility. Our long-term solution is to move that metadata out of the content altogether.
Comment 8 James Forrester 2014-02-24 22:44:59 UTC
(In reply to Gabriel Wicke from comment #7)
> Moving back to VE; Position of inline metadata is the client's
> responsibility. Our long-term solution is to move that metadata out of the
> content altogether.

This is semantically non-positional meta-data that breaks if not in a particular syntactical position…
Comment 9 Gerrit Notification Bot 2014-02-25 00:10:20 UTC
Change 115309 merged by jenkins-bot:
Always try to put redirects at index 0, offset 0

https://gerrit.wikimedia.org/r/115309
Comment 10 James Forrester 2014-02-27 21:40:13 UTC
Will mark this as fixed in favour of Parsoid bug 53508 then.

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


Navigation
Links