We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question

New pages are blank

Hi all,

I have a Perch site that I’m having issues with when a new page is created from within the admin area?

So first off I had to change the site path to /var/www/vhosts/dudleyarms.co.uk/httpdocs/ otherwise the users get an error on adding pages, Folder is not writable: /httpdocs/our-menus.

That is now resolved, but now when I create a page, first off the Location is automatically set to /var/www/vhosts/dudleyarms.co.uk/httpdocs/our-menus/light-lunch.php, obviously I can manually change this, which isn’t ideal. However, when I do, the page is just blank? https://www.dudleyarms.co.uk/our-menus/light-lunch

So I seem to have two issues: After creating a page, it is blank The location address created requires updating manually currently

Thanks

Grant Smith

Grant Smith 0 points

  • 1 year ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Have a look at "I have a blank page" here: https://docs.grabaperch.com/perch/help/

Thanks Rachel,

That's really useful, the error I'm receiving is mod_fcgid: stderr: PHP Warning: include(): Failed opening '../../perch/templates/pages/menu-list.php' for inclusion (include_path='.:/opt/plesk/php/7.0/share/pear') in /var/www/vhosts/dudleyarms.co.uk/httpdocs/our-menus/light-lunch.php on line 1

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Is that file there?

It is, yes.

screenshot

Drew McLellan

Drew McLellan 2638 points
Perch Support

Its the relative path correct for the location of the file?

I believe so, /our-menus/light-lunch.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

Where is Perch installed?

it's in /httpdocs/perch

screenshot

Drew McLellan

Drew McLellan 2638 points
Perch Support

The file Perch is looking for is

/perch/templates/pages/menu-list.php

in the screenshot, you're showing me the file

/our-menus/light-lunch.php

as proof of the file being in place. Those aren't the same file.

Hi Drew,

From within Perch admin, I am creating a new page, in the above example, this is light-lunch.php. When creating a new page, I need to assign it a template. menu-list.php is my template.

I'm aware these are not same the file, one is template menu-list.php and the other is the page. This page contains the following code:

File: /httpdocs/perch/our-menus/light-lunch.php

<?php include(str_replace('/', DIRECTORY_SEPARATOR, '../perch/templates/pages/menu-list.php')); ?>

This, to me at least, looks correct. The page is using the template it was instructed to use. This is all created within Perch Admin. However, when I do so, this page is blank.

Sorry if I have misunderstood your point.

Drew McLellan

Drew McLellan 2638 points
Perch Support

So the file /perch/templates/pages/menu-list.php is definitely there?

Correct

Is the path to Perch Runtime correct for where the page ends up? I normally use;

<?php include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php'); ?>

so that when when I move pages around, I know that the path is correct.