Forum

Thread tagged as: Problem

Page not showing in Perch

Hi,

I have a page in a subfolder that is not showing up in the 'backend' of Perch.

I have included perch on this page and made sure the filepath to the runtime is correct etc.

I also have valid perch content on this page etc.

Why is Perch not recognising this?

Any quick help would be greatly appreciated so thanks in advance, Sam

Sam Cooper

Sam Cooper 0 points

  • 7 years ago

I hope my question is clear: I have added perch to the page ie

<?php include('/perch/runtime.php');?>

I have an perch content on the page ie

<?php perch_content('Terms'); ?>

My page is still not showing up in Perch? And ideas?

If the page is in a subfolder, try:

<?php include('../perch/runtime.php'); ?>

Hi Mark, I have tried this and the page is still not showing up in Perch :(

Do I have to add it as a new page?

My setup is really simple I have a one-page website all working fine in Perch, now I have a page in a subfolder and I want to have an editable region on that page.

It seems the Add New Page button is for creating a page but my page already exists...

Shouldn't have to add the page as it appears when Perch picks up the content region.

Have you visited/refreshed the page before checking it shows up in the Perch admin?

I'm glad you said that as that's how I thought it worked!

Yep I have saved the file and refreshed perch etc. but still just the homepage showing up :-?

Here's how it normally works:

Add perch runtime (pages in subfolders need the "../" for each folder level):

<?php include('../perch/runtime.php'); ?>

Add the region:

<?php perch_content('Terms'); ?>

Go to the live page and refresh to pick up the content region and runtime (the terms content the the content region replaced should now be missing from the page).

Go to the Admin and refresh the "Pages" tab

New page appears with content region listed for you to edit.

Thanks so much for your time and help Mark! Yep thats exactly how I understand it too :)

Let me ask, is there anyway of me checking that the page is pulling in the runtime.php file correctly maybe using a dev tools inspector etc?

Best, Sam

Not sure Sam, sorry. Hopefully someone a bit more PHP savvy can answer that for you.

The only other thing I can think of might be to check you've changed the page filetype from "name-of-page.html" to "name-of-page.php"?

I know I've spent hours on that simple mistake in the past! It's got to be something really simple, guaranteed!!

Haha, Yeah I've done that before too but just double checked it to make sure!

Thanks for your time Mark I really appreciate it, I'm sure Drew or another member of the Perch team will be able to aid me further soon.

Thanks again, Sam

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can we please see your Diagnostics Report from under Settings in the Perch Admin plus the code of your page as it is now. Your initial runtime include was incorrect as you can't have root relative PHP includes.

Hi Rachel,

Yeah no probs, here is how my code is looking atm:

<?php include('../perch/runtime.php'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Terms & Conditions</title>
    <link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/style.css">
    <link rel="shortcut icon" href="favicon.ico"/>
    <link rel="apple-touch-icon" href="apple-touch-icon.png"/>
    <link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.png"/>
</head>
<body>
    <div class="top-bar">
        <a href="#"><img src="img/online.png" alt="online"></a>
        <!-- <span class="meeting-notes">- Terms & Conditions</span> -->
    </div>
    <article>
        <h1>Terms & Conditions</h1>
        <p>Please find Terms & Conditions in PDF format below:<br>
            <?php perch_content('Terms'); ?>
        </p>
    </article>
</body>
</html>

And here is my diagnostics report (with sensitive information replaced with ####)

Perch: 2.4.5
Production mode: Production (100)
Installed apps: content (2.4.5), perch_blog (3.9)
DB driver: PDO
DB tables: perch2_blog_authors, perch2_blog_categories, perch2_blog_comments, perch2_blog_posts, perch2_blog_posts_to_categories, perch2_blog_posts_to_tags, perch2_blog_tags, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_content_resources, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resources, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 9
App runtimes:
<?php
    include(PERCH_PATH.'/core/apps/content/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php');
?>
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: 421aa90e079fa326b6494f812ad13e79
L1: e4dbeb9befe778d7cc511d7f174f870a
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.3.4: done
latest_version: 2.5.3
on_sale_version: 2.7.4
headerScheme: light
dashboard: 0
content_hideNonEditableRegions: 0
logoPath: /perch/resources/1405349443_logo.png
update_2.4.4: done
perch_blog_post_url: /downloads/post.php?s={postSlug}
perch_blog_update: 3.8.2
update_2.4.5: done
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
content_frontend_edit: 0
perch_blog_comment_notify: 0
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: #####
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/London
PERCH_EMAIL_FROM: #######
PERCH_EMAIL_FROM_NAME: Sam Cooper
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/air 1/Desktop/projects/####-V4/perch
PERCH_CORE: /Users/air 1/Desktop/projects####-V4/perch/core
PERCH_RESFILEPATH: /Users/air 1/Desktop/projects/####-V4/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/air 1/Desktop/projects/#####-V4/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.2.17
Zend: 2.2.0
OS: Darwin
SAPI: apache2handler
Safe mode: not detected
MySQL client: 5.5.33
MySQL server: 5.5.33
Extensions: date, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, curl, dbase, dom, hash, filter, ftp, gd, session, iconv, json, ldap, mbstring, mysql, SimpleXML, SPL, PDO, pdo_sqlite, posix, Reflection, standard, mysqli, soap, sockets, SQLite, exif, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, apache2handler, imap, yaz, mcrypt, gettext, pgsql, pdo_pgsql, pdo_mysql
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 32M
PHP memory limit: 32M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
HTTP_HOST: localhost:8888
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
HTTP_REFERER: https://localhost:8888/perch/core/settings/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: wp-settings-1=mfold%3Do%26editor%3Dtinymce%26hidetb%3D1%26libraryContent%3Dbrowse%26imgsize%3Dlarge%26align%3Dright%26urlbutton%3Dcustom%26posts_list_mode%3Dexcerpt; wp-settings-time-1=1415632027; PHPSESSID=eb86c99bae6e8aba7feb1189b511baa7; cmsa=1; _ok=2559-584-10-1775; _okac=daa6d152a29fb2f0ad645150999e33c6; _okla=1; SQLiteManager_currentLangue=2; _ga=GA1.1.517207822.1415205996; _gat=1; _oklv=1417640505800%2CFzZWQyLXZ5wpObmu5F1fw2DeEPr3Ac5E; olfsk=olfsk47900233790278435; _okbk=cd4%3Dtrue%2Cvi5%3D0%2Cvi4%3D1417640507525%2Cvi3%3Dactive%2Cvi2%3Dfalse%2Cvi1%3Dfalse%2Ccd8%3Dchat%2Ccd6%3D0%2Ccd5%3Daway%2Ccd3%3Dfalse%2Ccd2%3D0%2Ccd1%3D0%2C; wcsid=FzZWQyLXZ5wpObmu5F1fw2DeEPr3Ac5E; hblid=uAEJyfMB2mXU45WY5F1fw2DdEP5E1y5r
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SOFTWARE: Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/0.9.8y DAV/2 PHP/5.2.17
SERVER_NAME: localhost
SERVER_ADDR: ::1
SERVER_PORT: 8888
REMOTE_ADDR: ::1
DOCUMENT_ROOT: /Users/air 1/Desktop/projects/######
SERVER_ADMIN: you@example.com
SCRIPT_FILENAME: /Users/air 1/Desktop/projects/#######-V4/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 62642
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME: 1417640562

Many Thanks, Sam

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Firstly Perch is very out of date. We offer support for the latest version of our software so the first thing to do is to make sure you are running the latest version of Perch and Blog.

Let us know once you have upgraded if you are still having the same issue.

I understand that Perch is out of date, but bearing in mind I have put a lot of time into trying to get some support could you let me know if my .php document is in proper shape and do you think upgrading Perch will fix anything or is it just your policy and I need to upgrade before I seek further support?

Also, thanks as always for you time Rachel.

Regards, Sam

Rachel Andrew

Rachel Andrew 394 points
Perch Support

I can't see anything obvious, so if we're to help you debug the issue then it needs to be the latest version of our software as that is what we would be using to reproduce the issue.