Page MenuHomePhabricator

Dynamically added comments to a transcluded page aren't picked up by DiscussionTools
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to https://test.wikipedia.org/wiki/Wikipedia:AddMe-test/Foo
  • Click the "Support" button and add a vote
  • Observe that AddMe (the gadget powering the "Support" button) added your comment to the /Voting subpage and re-rendered the content
  • Observe that DiscussionTools properly adds a [reply] link to the newly added comment (i.e. the wikipage.content hook is fired)
  • Click on the [reply] link

What happens?:

You are shown an alert "Could not find the comment you're replying to on the page. It might have been deleted or moved to another page. Please reload the page and try again."

What should have happened instead?:

The Reply tool should have opened as it does normally.

Other information:

Apparently this is due to DiscussionTools' pageDataCache not being refreshed, despite the client (AddMe in this case) triggering the wikipage.content hook and setting the appropriate JS vars, etc.

Event Timeline

Change 863030 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Clear `pageDataCache` whenever re-initializing

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

Change 863030 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Clear `pageDataCache` whenever re-initializing

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