Cannot Save page after editing
Hello. I have been trying to save a page after adding some images and everytime I get the following message:
"Not Acceptable
An appropriate representation of the requested resource /perch/core/apps/content/edit/ could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
I have since updated to the latest version to no avail.
Any thoughts?
Thanks
That looks like a server configuration issue. Can we see your diagnostics report?
Sure:
Perch information
Hosting settings
This has, I believe, something to do with some Fancybox code that I put in a template. If I remove it, it saves. If I add it, I get the error. Can't see why adding a link around an image would trigger the error. Any firther thoughts please?
Can we see the template?
Thanks. Here it is:
You are uploading a lot of images and your server limits are set very low. It's not the message I'd expect to see but it may be you are just getting a weird response from the server when you hit those limits.
Thanks. I'll try one by one and see what happens. Without the Fancybox link it works fine.
Further to above, I have tried using that template to upload a 39 KB thumbnail which still returns the same error. If you have another further comments, I'd very very grateful. If not, I'll ditch the Fancybox. Thanks, Martin
Can you upload any images? Just a simple template with an image in it.
And what do you mean by "fancybox link"?
Hi. I originally had a template with just thumbnails in it which worked fine. The client realised these were too small and wanted these to open a larger version so I used Fancybox. I added all the links to the scripts and stylesheets in the page to enable the Fancybox to work, but as soon as I added the anchor, it started throwing out this issue. This is the anchor code I wrapped each thumbnail in:
<a class="fancybox" rel="group" href="<perch:content type="image" id="largeimage2" label="Large pop-up image" width="640" />" alt="<perch:content type="text" id="largeimagealt2" label="Description" help="e.g. Agadir beach with Moroccan flag" title="true" />">...thumbnail...</a>
Does the same happen in your dev environment? It may be that you just need to allocate more resources to be able to process the sorts of images you're uploading.
I'll have a go and feedback. Thanks for the support.
Despite your excellent 24ways article about development environment's, I am actually working on a live server although it is unknown by the public at this stage. Yes, I know. The photos are 4 KB for the thumb and 70 KB for the large image. I have uploaded much larger on slideshows. I think for some reason it doesn't like the added Fancybox link so I will have to resort to a different type of lightbox. Any thoughts? Thanks and bon dimanche from a sunny Morocco.
That doesn't seem logical that small images would error when larger ones work. I think we'd need a bit more information to be able too offer anything useful.
I have now tried everything within my knowledge to sort this out.
I have a thumbnail image of 4 KB and a large image for the lightbox of 70 KB. I cannot see how this is using resources of which I seem to have 2 MB. I have tried PrettyPhot oand it returns the same error. if I remove the Fancybox or PrettyPhoto link, the thumbnails upload and the page saves.
How can uploading a smallish 70 KB file cause such an error? Might it be something to do with the type of lighbox software I'm using.
Do you offer anything that will give the same type of effect?
Thanks
I think FancyBox is a red herring here.
There is nothing specific about FancyBox that would cause that error. I'm pretty convinced this is a server or resources issue.
You need to step by step debug the issue until you find out what cause the problem. I'd go right back to the Perch template tags as a first step. If there is no HTML in there, just perch template tags does it work?
Thanks as usual for you help and thoughts.
I deconstructed and rebuilt piece-by-piece and now it works! There are a few bits I purposely omitted and this seems to have done the job.
Thanks for the advice.
UPDATE: After rebuilding the template as suggested, the process of uploading photos worked for a while but the 406 error returned again last night. After a lot of research, it was obvious that it was a GoDaddy hosting configuration issue.
That problem seems to have disappeared, but now nothing will save. The green confirmation bar that confirms that changes have been made does not appear. The page refreshes as if it has saved but no changes have been made. I have tried different browsers etc. but nowt.
Is this a connected issue or something else?
Thanks.
Have you checked your PHP error logs for errors?
There is a limited amount we can do if your hosting is being flaky. We have numerous reports of problems with GoDaddy. Not things we can solve, just general flakiness.
The PHP error log says this:
PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
After a bit of trawling, I found this info and added it to the php.ini: max_input_vars = 5000
It now works. I started work early today 08:30 to get lots done and I have uploaded one photo!!
I shall recommend the client moves to another host if this continues.
Thanks for your help.