Page MenuHomePhabricator

Show Preview functionality not working, only displaying text "[object Object]"
Closed, ResolvedPublic

Description

Quite often, I am unable to use the 2017 wikitext editor to edit pages because the "Show Preview" functionality will not render the article, and instead will only show the text "[object Object]" in place of the article. This seems to follow longer-than-normal load times, as if my request to render the page is timing out.

image.png (2×3 px, 147 KB)

The "Review Your Changes" functionality works when I have the Wikitext option chosen, but like the above issue, the Visual option does not work, giving me an infinite progress bar.

Event Timeline

matmarex renamed this task from Show Preview functionality not working, only displaying text "[Object] [Object]" to Show Preview functionality not working, only displaying text "[object Object]".Mar 18 2021, 12:38 PM
matmarex updated the task description. (Show Details)

Thanks for the bug report, I can reproduce the problem. This happens when displaying the preview fails for any reason, it was probably a timeout as you guessed, but it can also be reproduced by e.g. disconnecting your internet connection.

Expected error message is like this:

image.png (2×3 px, 151 KB)

Change 673254 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Fix displaying error message when preview fails

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

Change 673254 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Fix displaying error message when preview fails

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

@Y2kcrazyjoker4 That should fix the error message (the change will be deployed to Wikimedia wikis later this week).

The actual error is normal if you're working on a very large page, or using a flaky internet connection. If you experience this on reasonably sized pages using a stable connection, then please file another task (and link to the page causing the issue).