The error is at
feature.path = feature.path ? JSON.parse(feature.path) : {};
The function (Not sure why but in my case) is being called multiple times so after the first time feature.path is already an object and not a string anymore. Solved with a simple check
feature.path = feature.path ? feature.path instanceof Object ? feature.path : JSON.parse(feature.path) : {};
Making a patch.

CommentFileSizeAuthor
#3 3151552-3.patch1.39 KBviappidu
#2 3151552-2.patch570 bytesviappidu

Comments

viappidu created an issue. See original summary.

viappidu’s picture

Status: Active » Needs review
StatusFileSize
new570 bytes
viappidu’s picture

StatusFileSize
new1.39 KB

My bad! Found markercluster has same issue.
Attaching corrected patch

viappidu’s picture

Following on, found the error happens only when logged in as administrator.
Ready to bet is a problem related to quickedit...

  • itamair committed 272a8fb on 8.x-1.x authored by viappidu
    Issue #3151552 by viappidu: Unexpected token o in JSON at position 1
    
  • itamair committed 5b4b1d4 on 8.x-1.x
    Issue #3151552 by viappidu: Better refactoring of solution of Unexpected...
itamair’s picture

Status: Needs review » Fixed
viappidu’s picture

@Itamair, do you think is right to mark as fixed? I still think the real problem is elsewhere so, when/if found and solved, this could go back as was originally. Right?
PS Thanks for correcting my patch, definitely missed the group section. Thumbs up!

itamair’s picture

Well I couldn’t even reproduce your issue.
But I trusted your commitment and code.
Sincerely I don’t have time to inspect why this happens to you ... and how to reproduce. I guessed your code fixes.
Feel free to investigate and analyze further ... (and reopen eventually) tnx

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.