Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
I am getting the following error when I try to access any sub-pages (i.e. /about, /services) on my site:

The page isn’t working

Yoursite is currently unable to handle this request.
HTTP ERROR 500


The index page works fine, so does the admin. I'm developing locally on my Mac using MAMP. I have also tried to remove everything on the templates to debug the problem, and they only load if I remove everything in the code. If I just leave the Couch require_once and invoke tags, it still doesn't load.

Any ideas?
Thanks!
Hi Megan :)

Could you please PM me the problem template?
OK, I just realized it must be because I was putting templates in sub-directories (/services/index.php) and that won't work. Looks like I need to use this folder tag instead? http://docs.couchcms.com/concepts/using-folders.html
That would explain the problem, Megan :)

From the files that you PMed me, I can see that the template is 'index.php' file placed within a folder named 'services'.

Therefore, you need to change the following first line in the template
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>

to make it as follows -
Code: Select all
<?php require_once( '../couch/cms.php' ); ?>

If you need more info please see https://www.couchcms.com/forum/viewtopi ... 377#p20377

That should rectify the error.

Please also keep in mind that anywhere in your Couch tags where you need to set the 'masterpage' parameter to point to this template, you'll need to use 'services/index.php' (and not simply 'index.php'. If you are unsure about this, hover your mouse on the template's entry in the sidebar and you'll see its name in a tooltip).

Hope it helps.
Gotcha, thanks! I think I had this in the code originally but somehow changed it back and then didn't realize my error. Thanks so much for your help.

KK wrote: That would explain the problem, Megan :)

From the files that you PMed me, I can see that the template is 'index.php' file placed within a folder named 'services'.

Therefore, you need to change the following first line in the template
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>

to make it as follows -
Code: Select all
<?php require_once( '../couch/cms.php' ); ?>

If you need more info please see https://www.couchcms.com/forum/viewtopi ... 377#p20377

That should rectify the error.

Please also keep in mind that anywhere in your Couch tags where you need to set the 'masterpage' parameter to point to this template, you'll need to use 'services/index.php' (and not simply 'index.php'. If you are unsure about this, hover your mouse on the template's entry in the sidebar and you'll see its name in a tooltip).

Hope it helps.
5 posts Page 1 of 1