Forum

Thread tagged as: Problem, Runway, Shop

Master Page List Not Refreshing

I am setting up the shop app and I created some templates in:

perch/templates/pages/

I then decided to move them into a shop sub folder like I had previously done for blog so I now have:

perch/templates/pages/shop/

I also created some more by duplicating existing ones.

When I go into perch admin, page options and try to set the master page the list has not refreshed properly. I still have the templates appearing in the general section and they also appear in the shop section. One is still showing as products copy as I had duplicated the file in Coda editor even though I have since renamed it. I had it stick like this a few minutes ago but by logging out and in again and generally clicking around it seemed to refresh partly. I have tried republishing all pages and still the list is not refreshing.

If I select products copy for the master page even though the file has since been renamed I get the following error in Debug.

Array
(
    [type] => 2
    [message] => include(): Failed opening '/Users/greg/Sites/millers/trunk/perch/templates/pages/shop/products copy.php' for inclusion (include_path='.:/Applications/MAMP/bin/php/php7.0.10/lib/php')
    [file] => /Users/greg/Sites/millers/trunk/perch/core/runway/start.php
    [line] => 32
)

This is my Diagnostic Report:

Perch Runway: 2.8.31, PHP: 7.0.10, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_forms (1.8.3), perch_shop_orders (1.0.8), perch_shop_products (1.0.8), perch_shop (1.0.8), perch_members (1.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_blog', 'perch_members', 'perch_shop', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/greg/Sites/millers/trunk/perch
PERCH_CORE: /Users/greg/Sites/millers/trunk/perch/core
PERCH_RESFILEPATH: /Users/greg/Sites/millers/trunk/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: millers
DOCUMENT_ROOT: /Users/greg/Sites/millers/trunk
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Greg Riley

Greg Riley 1 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

That message means that PHP is not able to find a file at that location or is unable to open a file at that location - that's not coming from Perch. So something is off in where these files are.

The products copy.php is not there, that is my problem the file that is there is called product_list.php but that will not appear on the dropdown list in perch admin to select as the master page to use. The whole list is not responding to any changes I make to the files in the

perch/templates/pages/ 

folder.

screenshot perch admin

screenshot files

As you can see the two do not represent each other and I have no idea where Local file has appeared from on the list.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you see it listed in the Master Pages section of the control panel?

Yes that has mostly solved the issue. I have been able to delete the master pages that did not exist as files in the /perch/templates/pages/ folder using the Master Pages section of admin, and the dropdown list for master pages in page options now represents the files that do exist. Apart from I still have an entry for "Local File" in the general section of the dropdown list, but this is not shown in the Master Pages section of admin for me to delete.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's a special entry to indicate that you're using a file placed locally in the site rather than a master page. This would be the case if e.g. upgrading a site from Perch to Runway.

It is a new site starting from scratch so I don't know what it is picking up on, but I can live with one extra entry on the list.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's a special entry - it's there for a purpose.