Web site pages blank

  • Hi Folks

    just discovered that a website we built years ago with Perch has several pages that are simply not displaying, not even sure how long it has been like this. The pages that are working are not in the Perch CMS system. It's been a long time since I did any Perch work so am very rusty. Just wondering if you could point me in the right direction in what to look into first. Example page: http://wenlock-stoves.co.uk/traditional_stoves.php

    I am getting the following error in the cms:

    Editing ‘Traditional stoves’ Page

    Add subpage The page attribute template (templates/pages/attributes/default.html) could not be found.

    I did a diagnostic check and that comes up with no issues. See:

    • PHP 7.4.16 is up to date
    • MySQL 10.3.28-MariaDB-log-cll-lve is up to date

    • Image processing available

    Summary information

    • Perch: 3.1.7, PHP: 7.4.16, MySQL: 10.3.28, with PDO
    • Server OS: Linux, litespeed
    • Installed apps: content (3.1.7), assets (3.1.7), categories (3.1.7)
    • App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); ?>
    • PERCH_PATH: /home/stoves/public_html/cms
    • PERCH_CORE: /home/stoves/public_html/cms/core
    • PERCH_RESFILEPATH: /home/stoves/public_html/cms/resources
    • Image manipulation: GD
    • PHP limits: Max upload 1024M, Max POST 1024M, Memory: 1024M, Total max file upload: 1024M
    • F1: 3b606135b33e6a102526838f4152a807
    • Resource folder writeable: Yes
    • HTTP_HOST: wenlock-stoves.co.uk
    • DOCUMENT_ROOT: /home/stoves/public_html
    • REQUEST_URI: /cms/core/settings/diagnostics/
    • SCRIPT_NAME: /cms/core/settings/diagnostics/index.php

    thank you


  • Gareth S

    Approved the thread.
  • Are you missing the template in templates/pages/attributes/default.html?

    Hi Clive, in the templates/pages folder there is no attributes folder and so no default file. But there is a default file in the templates/page folder. I'm pretty confident there never was an attributes folder as there is no such folder on the remote server or my local drive. Hard to imagine i deleted it. I've not touch this website for quite a long time.

  • I updated the core to the latest. I also added back in the Atrributes folder and its contents (from the latest version without modifying them- which caused the error message to go away). Perch pages still not working.

  • I'n not clear. The error message has gone but pages are not working? What specifically isn't working?

    If you click here http://wenlock-stoves.co.uk/traditional_stoves.php it's a blank page. That's the problem. The error message disappeared because I just added back in the Attributes folder and default.php (from the latest version of perch without modifying these files- I'm assuming they're supposed to be modified for the page design).

  • this is all that's in the source, when doing a 'view source' on the page

    <!-- What Size -->
    <div class="debugging-tools">
    <div class="visible-xs">**XS**</div>
    <div class="visible-sm">**SM**</div>
    <div class="visible-md">**MD**</div>
    <div class="visible-lg">**LG**</div>
    <div style="display: none;" class="mobile_msg">MOBILE**</div>
    <div style="display: none;" class="tablet_msg">TABLET**</div>
    <div style="display: none;" class="computer_msg">COMPUTER**</div>
  • I looked at the raw logs and only getting error 500 for the perch pages.

    I've enabled perch error logging to show on the page using <?php PerchUtil::output_debug(); ?> (and debug in the config file) but nothing shows up, suggesting that the page is not even being read.

  • You are not seeing any PHP errors in the error logs?


    This is a very old site that was built by a former employee. In the page code before the runtime line was a mobile detect line

    <? include "includes/page.setup.inc.php"; ?>

    I think this is stopping the page showing the true error. I have removed that line and now simply get an error 500 message showing when the page tries to load.

    That of course doesn't really help.

    I'm going to dig into some old backup files to see if there was ever a default.php file in the attributes folder that had been customised.

  • Looks like both are used.

  • As should be seen in the screenshot from an old backup, there never was an attributes folder in templates>pages folder. So the error that was being thrown (

    Add subpage 
    The page attribute template (templates/pages/attributes/default.html) could not be found.)
    in the cms seems unrelated.

  • I now have a working website by uploading the old backup. However, the cms wouldn't let me log in, so I upgraded core to the latest. The the same problem of blank pages occurred. So have reverted back to the old core.

    The error i get trying to log into the cms is Sorry, your license key isn't valid for this domain.

    Which isn't true. The upgrade usually solves this.

    Any thoughts?

  • This is probably due to PHP version. Older versions of Perch show this error on PHP versions above 7.1 I believe.