Total CMS - Uncaught SyntaxError: Unexpected end of JSON input

Hello
I’m facing a server internal error 500 - The content of the blog page is missing and there is no way to add a new blog input.
I’m using the RW version 8.2.1 and OS version 10.12.8
The RW blog page (https://www.photoclub-aigle.ch/articles/) worked fine. This issue started in time my hosting company transferred all the data to another server (changing also the URL). They are saying this issue doesn’t come from their side, however I wonder if there was not some permalink loss or another parameter braking the link.

Not only the page is empty, but if I start writing a new blog, I’m getting the following error message:

jquery-2.2.4.min.js:4 GET https://www.photoclub-aigle.ch/rw_common/plugins/stacks/total-cms/totalapi.php?slug=articles&type=blog&permalink=test&_=1563391049713 500 (Internal Server Error)
send @ jquery-2.2.4.min.js:4
ajax @ jquery-2.2.4.min.js:4
checkPermalink @ stacks_page_page63.js:320
(anonymous) @ stacks_page_page63.js:338
dispatch @ jquery-2.2.4.min.js:3
r.handle @ jquery-2.2.4.min.js:3
stacks_page_page63.js:321 {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
error @ stacks_page_page63.js:321
i @ jquery-2.2.4.min.js:2
fireWith @ jquery-2.2.4.min.js:2
z @ jquery-2.2.4.min.js:4
(anonymous) @ jquery-2.2.4.min.js:4
send @ jquery-2.2.4.min.js:4
ajax @ jquery-2.2.4.min.js:4
checkPermalink @ stacks_page_page63.js:320
(anonymous) @ stacks_page_page63.js:338
dispatch @ jquery-2.2.4.min.js:3
r.handle @ jquery-2.2.4.min.js:3
load (async)
send @ jquery-2.2.4.min.js:4
ajax @ jquery-2.2.4.min.js:4
checkPermalink @ stacks_page_page63.js:320
(anonymous) @ stacks_page_page63.js:338
dispatch @ jquery-2.2.4.min.js:3
r.handle @ jquery-2.2.4.min.js:3
VM403:1 Uncaught SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.error (stacks_page_page63.js:321)
    at i (jquery-2.2.4.min.js:2)
    at Object.fireWith [as rejectWith] (jquery-2.2.4.min.js:2)
    at z (jquery-2.2.4.min.js:4)
    at XMLHttpRequest.<anonymous> (jquery-2.2.4.min.js:4)
    at Object.send (jquery-2.2.4.min.js:4)
    at Function.ajax (jquery-2.2.4.min.js:4)
    at checkPermalink (stacks_page_page63.js:320)
    at HTMLFormElement.<anonymous> (stacks_page_page63.js:338)
error @ stacks_page_page63.js:321
i @ jquery-2.2.4.min.js:2
fireWith @ jquery-2.2.4.min.js:2
z @ jquery-2.2.4.min.js:4
(anonymous) @ jquery-2.2.4.min.js:4
send @ jquery-2.2.4.min.js:4
ajax @ jquery-2.2.4.min.js:4
checkPermalink @ stacks_page_page63.js:320
(anonymous) @ stacks_page_page63.js:338
dispatch @ jquery-2.2.4.min.js:3
r.handle @ jquery-2.2.4.min.js:3
load (async)
send @ jquery-2.2.4.min.js:4
ajax @ jquery-2.2.4.min.js:4
checkPermalink @ stacks_page_page63.js:320
(anonymous) @ stacks_page_page63.js:338
dispatch @ jquery-2.2.4.min.js:3
r.handle @ jquery-2.2.4.min.js:3
jquery-2.2.4.min.js:4 POST https://www.photoclub-aigle.ch/rw_common/plugins/stacks/total-cms/totalapi.php 500 (Internal Server Error)
send @ jquery-2.2.4.min.js:4
ajax @ jquery-2.2.4.min.js:4
blogSubmit @ stacks_page_page63.js:336
(anonymous) @ stacks_page_page63.js:339
dispatch @ jquery-2.2.4.min.js:3
r.handle @ jquery-2.2.4.min.js:3
stacks_page_page63.js:336 {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
error @ stacks_page_page63.js:336
i @ jquery-2.2.4.min.js:2
fireWith @ jquery-2.2.4.min.js:2
z @ jquery-2.2.4.min.js:4
(anonymous) @ jquery-2.2.4.min.js:4
load (async)
send @ jquery-2.2.4.min.js:4
ajax @ jquery-2.2.4.min.js:4
blogSubmit @ stacks_page_page63.js:336
(anonymous) @ stacks_page_page63.js:339
dispatch @ jquery-2.2.4.min.js:3
r.handle @ jquery-2.2.4.min.js:3
stacks_page_page63.js:337 CMS Post Error: Unable to locate error message (error Internal Server Error)``

I will appreciate your help
Zdenek

errors in debug show:
You do not have the PHP gd extension enabled
The mb_detect_encoding() function is not installed. Install the php-mbstring package.

Turn this on in your hosting php settings if you can, or have your host do it for you.
Once that is done if you still get an error, post it again

2 Likes

Thank you Scott, this helped to fix globally the issue.
However, there is one remaining issue: the upload of the pictures doesn’t generate the thumbnails. I wonder if there is another PHP extension missing - I’m getting following alerts:

[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.

GET https://www.photoclub-aigle.ch/cms-data/gallery/blog/articles/test/06-ecole-photo-01-sq.jpg 404 (Not Found).

Here are the Debug Results, notice the one at the top.

CMS Debug Info

You do not have the PHP gd extension enabled

PHP version: 7.2.20

HTTP_HOST: www.photoclub-aigle.ch

SERVER_NAME: www.photoclub-aigle.ch

DOCUMENT_ROOT: /home/photoclu/public_html

DOCUMENT_ROOT (realpath): /home/photoclu/public_html

SITE ROOT: /home/photoclu/public_html

CONTEXT_DOCUMENT_ROOT: /home/photoclu/public_html

SCRIPT_NAME: /rw_common/plugins/stacks/total-cms/totaldebug.php

POST_MAX_SIZE: 20M

UPLOAD_MAX_FILESIZE: 20M

MEMORY LIMIT: 128M

MAX_EXECUTION_TIME: 90

SERVER LOCALE: C

CMS LOCALE: en_US.UTF-8

CMS VERSION: Total CMS v1.5.2 (8468)

Total CMS Passport Check: {“status”:true,“info”:“Domain registered”,“trial”:false}

NOTE: it wont fix any you have already uploaded. the thumbs get created on upload.
S.

Thank you Scott
A question from user which is not so friendly with the program codes:
To avoid boring the RW community with this kind of topics, is there any list of all the PHP extensions the CMS is requiring - or how to run an easy understanding debug ?

List, not that I’m aware of.

There is a debug stack as part of Tcms, just drag it on the page and preview in RW, no need to publish.

1 Like

Thanks @swilliam

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.