Problems, need help? Have a tip or advice? Post it here.
19 posts Page 2 of 2
I'm trying to upate one of my gallery templates to allow for inserting iframes, but get this when saving the page:

Not Acceptable An appropriate representation of the requested resource /couch/ could not be found on this server. Additionally, a 404 Not Found error

I have the no_xss_check feature enabled.
Hi cardmaverick,

This, perhaps, is due to hardened security on your web server (e.g. suhosin) that disallows posting IFRAME anywhere in the content.
My blog and global templates allow for posting these types of things. Even a script tag sets it off in the templates I'm trying to modify.
I'll need to take a look at your setup first-hand. Can you PM me the required FTP+Couch creds?
Thanks.
I found the problem, and I think it's a very weird bug...

The issue seems to be caused by using the word "information" for the name of the editable field. I made the following change:

name="story"

It now works. I found this by duplicating the template that worked and inserting my editable field from the original problem template. The field had issues in the new template, the only difference I could see were the labels and names.... so I changed the one that worked to look like the problem one and the error would happen in that field.

Super weird!

So now I have a bit of an issue here... how do I change the name of my original templates field without messing up the database? Do I need to edit the database in PHP MyAdmin and then upload the corrected template?
Weird indeed but I've seen this happen a few times before - and it was always some 'security hardening' mod on the server going paranoid over the posted contents.

Anyway, I am glad you could pinpoint the exact reason.
Changing the field's name would require making changes directly to the database but I'm sure you'll manage it fine.

Please make sure to take a database backup (or atleast a gen_dump) before proceeding.
Fire up phpMyAdmin (or any db_manager available to you). First check the 'couch_templates' table. Find your problem template in the 'name' column and note down the 'id' of it.

Now for the actual modification - open the 'couch_fields' table. Find your field in 'name' column (making sure that the 'template_id' column value is the same as the one we noted above because there could be several templates having field of the same name).

Edit the row and change the field name.

Hope this helps.
Thanks for the instructions! Do I need to alter the PHP file too? Do I alter the database, then load in the corrected php file?
On yes!
Make the changes to the database but don't access the template through browser as super-admin (else Couch will recreate the fields with the old names). Next modify the template to change the field names and upload it.

Hope this helps.
Success! :) Thanks!
19 posts Page 2 of 2