15

Over the last couple of days I've noticed a problem with the banner popup that says there's been changes to the post your viewing.

Clicking the banner doesn't seem to apply any changes to the page and today I was able to capture an error in the console

Uncaught Error: Syntax error, unrecognized expression: {"Html":" ... ","VotesCastJson":[]}

The Html part seems to contain the post contents.

The problem is that the code making the request expects a straight HTML response and not JSON

jQuery.get(url, "html").done(data => {
  const $doc = $(data) // this causes the error
11
  • 8
  • 4
    Cheers @SebastianSimon, the search functions around here are terrible
    – Phil
    Commented Mar 10, 2022 at 2:20
  • 5
    I'll grant you that the built-in search is terrible, but even if it were not terrible, it still wouldn't have found that Q&A on a completely different site. :-)
    – Cody Gray Mod
    Commented Mar 10, 2022 at 8:04
  • 1
    I got a bit frustrated with this not working, so I've added a userscript which patches this issue as an answer to: "Loading posts in real time is broken in some cases due to a breaking change in the format data is returned".
    – Makyen Mod
    Commented Mar 10, 2022 at 17:58
  • 1
    @CodyGray I searched on MSE too
    – Phil
    Commented Mar 10, 2022 at 21:57
  • @Phil Try Google search instead. I used site:meta.stackexchange.com "an edit has been made" after:2022-02-01 and found it immediately.
    – wjandrea
    Commented Mar 10, 2022 at 22:14
  • @wjandrea using the on-site search was my mistake. I do use Google for finding StackOverflow posts
    – Phil
    Commented Mar 10, 2022 at 22:17
  • 2
    Honestly, Google search with site:meta.stackexchange.com or site:meta.stackoverflow.com does very often lead to irrelevant results, to such a degree, that the on-site search is often better. I’m just glad that there is now a potential duplicate target on MSO as well as MSE. I only commented two minutes after your post because I anticipated multiple duplicates for this bug (although yours was the first one after four days, and there hasn’t been a new one since), so I watched Meta closely and was prepared to link to the original very quickly. Commented Mar 10, 2022 at 23:55
  • 1
    @SebastianSimon I appreciate your diligence
    – Phil
    Commented Mar 10, 2022 at 23:56
  • This appears to have been fixed recently. Commented Mar 30, 2022 at 5:35
  • 3
    This was fixed on Monday, see my answer on the MSE post
    – Kyle Pollard StaffMod
    Commented Mar 31, 2022 at 19:06

0

You must log in to answer this question.

Browse other questions tagged .