I’ve recently put a site online and made some changes to the content while it was online. I have come back to find that the content is no longer able to save changes to some fields — I get “An unexpected error occurred” when trying to do so.
I am stumped as to why this is all of a sudden happening. I can edit content in the Site options panel, but not in the single page which I have put together.
For some unknown reason, I’ve come back to the issue a week later and it’s fixed itself! I honestly have no idea why, but I would be sharing a screenshot of the dialogue box otherwise. I haven’t made any changes to the site since I lodged this question, so that’s peculiar.
I had checked permissions and installation issues, but I have another occurrence of Kirby running on another web-server from the same provider with no issues. Again, it was an error that was only occurring on some back-end pages and not others.
I will come back if it occurs again. Thanks for your suggestions thus far!
Personally, I haven’t had problems with underscores or camelCase, but that may depend.
I have come across this kind of error quite a few times, usually caused by errors when developing custom fields or when something is wrong in a hook. But if you don’t use plugins or hooks, then that obviously can’t be the cause.
Have you had a chance to test the site on localhost?
I can confirm my website have this issue too. Strange thing is, when I dump my live site and install it in localhost, editing work like a charm. No error.
Ok in my case it is happening only on the url field type when the content begins with http:// or https:// it gives me an error and it breaks save state completely…
Same problem for me on my live environment, localhost works fine. I tried to update to Kirby 2.5.7 but the error is still there. I don’t have any plugins or hooks.
The Console in Chrome Dev Tools give me
Uncaught SyntaxError: Unexpected token <
from js?v=2.5.7:1
The content of the file if I click on it in Dev Tool is: <?php
A file which looks in the dev tools to exist at panel/plugins/js?v=2.5.7 but that file does not exist and what is it?
I’m experiencing the same issue, with a current client. The site has been up and running fine for a few months. Then today we received a call from the client, stating that they were being unable to update some of the information on the site.
The client has multiple locations, so we setup a structure field, where the client can copy+paste google map ‘embed’ code, which then gets displayed on the site. Should be pretty simple - and it has been working fine so far. The client had accidentally deleted the google embed code, and was trying to copy+paste them back into the structure field - but it wouldn’t let him… Here is what happens:
If the client enters ‘empty’ or plain text into the field, they can save it - no problem
if the client enters the google embed code, they get the error message:
I’m guessing that the Panel is trying to update info via AJAX, and it’s failing because of some kind of server configuration.
I’ve downloaded a complete copy of the client’s site to my local computer, and also uploaded it to our staging server. Both on my local computer AND on the staging server the site works flawlessly - I can save the google embed code without any errors.
I then tried comparing the PHP setup on the client’s production server, and on our staging server - there doesn’t seem to be any disparity between PHP extensions or options.
Everything seems to point out to a server issue, but it would be easier to convince the client if we actually knew what the issue was…
Any solution found for this bug ? My client reports it to me from time to time.
It’s often due to just one word in the texte, when I replace this word, I’m able to update the page.
@luxlogica@gillesvauvarin Could you please post your PHP error log? The error message itself could point to anything as it’s not thrown by Kirby itself.