Page MenuHomePhabricator

[Regression] Reply link disappears from a talk page after editing it from source mode
Closed, ResolvedPublic

Description

Steps to replicate:

  1. Go to any talk page.
  2. Click on Edit Source.
  3. Edit something on that page and save it.

Observe that, all the Reply links disappeared. Refreshing the page brings them back though.

This also happens when you add a new section to that page.

Screen Shot 2020-01-03 at 1.59.44 PM.png (457×1 px, 166 KB)

Event Timeline

This doesn't happen if you edit just a section.

Were you using the 2017 wikitext editor? It happened to me for full-page editing and creating new sections with the 2017WTE but not for editing the full page in the 2010WTE, which reminded me of T103285: HotCat doesn't load after saving a page in VisualEditor (must refresh/reload first) [AOI].

Change 561993 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Fix re-initialization after page is updated

https://gerrit.wikimedia.org/r/561993

With this patch the links re-appear, but they don't work, you get an exception like this:

Uncaught TypeError: Cannot read property 'parentNode' of null
    at Object.addListAtComment
    at HTMLAnchorElement.<anonymous>
    at HTMLAnchorElement.dispatch
    at HTMLAnchorElement.elemData.handle

This is because we use Range objects to store the location where a reply should be inserted, and VE moves parts of the page around, which invalidates these ranges. This will need a bit more work.

JTannerWMF subscribed.

Moving this on the board so we can prioritize. If you're actively working on this @matmarex feel free to move to current work board.

Moving this on the board so we can prioritize. If you're actively working on this @matmarex feel free to move to current work board.

@JTannerWMF / @matmarex, in cleaning up T235923, I came across this ticket. Considering this has a patch awaiting review, I'm moving this to VisualEditor (Current work).

Change 561993 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Fix re-initialization after page is updated

https://gerrit.wikimedia.org/r/561993

Change 570397 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Stop using native Range objects, they're too annoying

https://gerrit.wikimedia.org/r/570397

Change 570397 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Stop using native Range objects, they're too annoying

https://gerrit.wikimedia.org/r/570397