Issue with storageManager 'remote' #5709
Unanswered
Double5peed
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Check the raw response, you're not returning a JSON but an HTML document. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello All!
Looking to save/retrieve from MySQL so have created save.php and load.php and configured this in storageManager contentTypeJson: true.
I've added debugging as you can see below I keep getting a storage error load:
Starting to load data...
news-letters/:64 Storage error (load): SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
at JSON.parse ()
at RemoteStorage.ts:81:56
news-letters/:56 Data loading process has ended.
Editor.ts:1051 SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
at JSON.parse ()
at RemoteStorage.ts:81:56 {level: 'error'}
news-letters/:68 Direct fetch response (load.php): {"gjs-css": "div {color: red;}", "gjs-html": "
In developer tools under the network tab I've confirmed looking at load.php that the Response is:
{"gjs-css": "div {color: red;}", "gjs-html": "
Can anyone advise me what is wrong?
Beta Was this translation helpful? Give feedback.
All reactions