Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi,

I have a website where I am using something simular to the globals.php example found in the documentation. It seems all fine, it shows up in the CMS and the values are there and I can use them on my website. The only problem is that I can't edit these values.

This is how my globals.php file looks:
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Global Settings' executable='0'>

<cms:editable name='site_name' label='Websites Name' type='text' >MediumWideShot.com</cms:editable>
<cms:editable name='site_desc' label='Websites Description' type='text' >Directing/Editing/VFX/Motion Graphics in Brisbane, Australia</cms:editable>
<cms:editable name='site_email' label='Websites E-Mail' type='text' >mediumwideshot@gmail.com</cms:editable>


<cms:editable name='social_media' label='Social Media Links' type='group' />
<cms:editable name='facebook_page' group='social_media' label='Facebook' type='text' >https://facebook.com/mediumwideshot</cms:editable>
<cms:editable name='twitter_page' group='social_media' label='Twitter' type='text' >http://twitter.com/#!/mediumwideshot</cms:editable>
<cms:editable name='youtube_page' group='social_media' label='YouTube' type='text' >#</cms:editable>
<cms:editable name='vimeo_page' group='social_media' label='Vimeo' type='text' >#</cms:editable>


</cms:template>
<?php COUCH::invoke(); ?>


As you can see I've added some values strait into the html code. But for some reason I get this error message when I try to edit them from the Couch CMS interface:
Code: Select all
Forbidden

You don't have permission to access /couch/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Hi,

Will have to look at the problem first-hand. Could you please PM me your FTP/Couch creds?
Hi,

I had a look at your site and it seems your host is using 'Hardened PHP' (Suhosin module).
This is a security module that, of many other paranoid things, disallows the the string 'http://' or 'https://' anywhere in POST inputs.

As two of your editable regions were having the foresaid string in them, PHP was not allowing the save to succeed.

The only way to circumvent this problem is to remove the 'http://', 'https://' from the editable regions (and add them while outputting the values on the webpage). I have done so for testing purpose and the template is getting saved without a hitch.

I know this is a pain but I am sure you'll realize that this matter is totally outside the purview of Couch (will occur on any script running on your server).

Thanks
Hmm, That is pretty weird as I have fields on other templates that uses http:// (Image fields), and I can edit them as much as I want to without getting the 403 Forbidden message. As long as this dont spread to the image fields I guess its okay
I believe the image/thumbnail fields are saved differently. They do not have the site url hardcoded, so as to ease migration. For example, an image field that points to "http://www.example.com/uploads/image/news/item.jpg" is really saved as ":news/item.jpg". I think this also applies to 'file' editable regions.
5 posts Page 1 of 1
cron