Forum

Thread tagged as: Question, Problem, Error

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

Martin Dady

Martin Dady 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That looks like a server configuration issue. Can we see your diagnostics report?

Sure:

Perch information

Perch: 2.7.10
Production mode: Production (100)
Installed apps: content (2.7.10), assets (2.7.10), categories (2.7.10)
DB driver: PDO
DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 2
App runtimes:

<?php
    $apps_list = array(
        'content', 
        'categories',
    );

Editor plug-ins: ckeditorv18.zip, ckeditor, markitup
H1: 65e4a927adcd5d214e9d3e6feb5fea1b
L1: aa81f236edc98613e94930099b0395ca
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.6.5: done
latest_version: 2.7.10
on_sale_version: 2.7.10
headerScheme: light
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
logoPath: /perch/resources/logo.png
update_2.6.6: done
update_2.7.10: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: sv_admin
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: svperchdatabase
PERCH_DB_PREFIX: perch2_
PERCH_DB_CHARSET: utf8
PERCH_TZ: Africa/Casablanca
PERCH_EMAIL_FROM: martindady@me.com
PERCH_EMAIL_FROM_NAME: Martin Dady
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/tag0un1t3/public_html/perch
PERCH_CORE: /home/tag0un1t3/public_html/perch/core
PERCH_RESFILEPATH: /home/tag0un1t3/public_html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/tag0un1t3/public_html/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_PORT:
PERCH_DB_SOCKET:

Hosting settings

PHP: 5.5.20
Zend: 2.5.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.35
MySQL server: 5.5.35-cll-lve
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, cgi-fcgi, PDO, pdo_mysql, bcmath, imagick, gd, mysql, fileinfo, sockets, zip, xmlwriter, json, exif, soap, xmlrpc, mysqli, imap, dom, pdo_sqlite, Phar, xmlreader, posix, mcrypt, xsl, mhash
GD: Yes
ImageMagick: Yes
PHP max upload size: 2M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 2M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /usr/local/bin:/bin:/usr/bin
PWD: /usr/local/cpanel/cgi-sys
PHP_FCGI_MAX_REQUESTS: 5000
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 59619
SCRIPT_FILENAME: /home/tag0un1t3/public_html/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: webmaster@morocco-adventure-holidays.com
CONTEXT_DOCUMENT_ROOT: /home/tag0un1t3/public_html
REQUEST_SCHEME: http
DOCUMENT_ROOT: /home/tag0un1t3/public_html
REMOTE_ADDR: 41.141.223.159
SERVER_PORT: 80
SERVER_ADDR: 192.186.239.7
SERVER_NAME: morocco-adventure-holidays.com
SERVER_SOFTWARE: Apache mod_fcgid/2.3.10-dev
LD_LIBRARY_PATH: /usr/local/apache/lib
HTTP_CONNECTION: close
HTTP_COOKIE: _ga=GA1.2.2018564738.1421399113; cmsa=1; PHPSESSID=90f50dfa2678a9e4788879066ba3ac50; cmssb=0
HTTP_REFERER: https://morocco-adventure-holidays.com/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101 Firefox/35.0
HTTP_HOST: morocco-adventure-holidays.com
UNIQUE_ID: VNUAhbioyLYAAGEqu3YAAAIE
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1423245445.5858
REQUEST_TIME: 1423245445
argc: 1

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?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can we see the template?

Thanks. Here it is:

<perch:repeater id="destinationslist" label="Destinations">
<h3 id="<perch:content id="destinationid" type="text" label="Destinations anchor" required="true" help="Destination name in lower case. If two words, use hyphen." />"><perch:content id="destinationheading" type="text" label="Destination" required="true" help="Destination (e.g. Ouirgane Valley" divider-after="First photo" /></h3>
<ul class="three-thumbs-lrl group mb0">
<li><a class="fancybox" rel="group" href="<perch:content type="image" id="largeimage" label="Large pop-up image" width="640" />" alt="<perch:content type="text" id="largeimagealt" label="Description" help="e.g. Agadir beach with Moroccan flag" title="true" />"><img src="<perch:content type="image" id="image1" label="Small thumbnail image" width="163" />" alt="<perch:content type="text" id="alt1" label="Photo description" help="e.g. Agadir beach with Moroccan flag" title="true" divider-after="Second photo" />" /></a></li>
<li><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" />"><img src="<perch:content type="image" id="image2" label="Small thumbnail image" width="163" />" alt="<perch:content type="text" id="alt2" label="Photo description" help="e.g. Agadir beach with Moroccan flag" title="true" divider-after="Third photo" />" /></a></li>
<li><a class="fancybox" rel="group" href="<perch:content type="image" id="largeimage3" label="Large pop-up image" width="640" />" alt="<perch:content type="text" id="largeimagealt3" label="Description"  help="e.g. Agadir beach with Moroccan flag" title="true" />"><img src="<perch:content type="image" id="image3" label="Small thumbnail image" width="163" />" alt="<perch:content type="text" id="alt3" label="Photo description" help="e.g. Agadir beach with Moroccan flag" title="true" />" /></a></li>
</ul>
<perch:content id="destinationtext" type="textarea" label="Destination detail" markdown="true" editor="markitup" />
<p class="tal"><a href="#"><i class="fa fa-chevron-up"></i> Back to full destination list</a></p>
<div class="divider"></div>
</perch:repeater>
Rachel Andrew

Rachel Andrew 394 points
Perch Support

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.

PHP max upload size: 2M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 2M

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

Rachel Andrew

Rachel Andrew 394 points
Perch Support

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>

Drew McLellan

Drew McLellan 2638 points
Perch Support

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.

Drew McLellan

Drew McLellan 2638 points
Perch Support

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

Rachel Andrew

Rachel Andrew 394 points
Perch Support

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.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

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.