modxcms / fred

The friendly front-end editor for visual, drag-and-drop content building in MODX CMS
https://fred.modx.com
MIT License
57 stars 25 forks source link

Unsupported characters in content results in invalid json. #467

Open BigBlockStudios opened 1 year ago

BigBlockStudios commented 1 year ago

Unsupported characters in content results in invalid json editor won't load. In my case this was caused by a collation/character set mismatch while uploading a database.
If these improperly encoded characters are in the page content - the editor won't load on the front end with a

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

error. You get the same error if you create a new page but any elements containing improper characters will cause the editor to display
"SOMETHING WRONG HAPPENED"