Pages are incorrectly appearing in Editors Listing pages

  • Creating a new site using Perch: 3.1.4 and PHP 7.2.15


    I have a number of list category and detail pages to which in past Perch versions only the "list" page would appear in the editors view. On this build both category and detail page turn up in the editor if the page is loaded on the site even though there's no Perch regions on these pages as i'm using perch_custom_create from the list page only.


    Also other pages like 404, thankyou/error pages with nothing but shared footer content are also appearing in the editor.


    OK sometimes when build a site you have odd pages loading in the editor as you're working but you can delete them and upload a copy page to clear that even though the page is visited. But this version appears to ignore that process and keeps bringing back these pages when loaded in a browser


    Has this behaviour changed in Perch: 3.1.4? What criteria does Perch 3.1.4 require to load a page? Many pages with only shared content are re-appearing.


    Not the end of the world here... but it does stop the client saying "why is this page listed when I can't edit anything".

  • drewm

    Approved the thread.
  • So for example looking at the 404 page (there's others) has the following php...


    <?php include('cms/runtime.php');?>
    <?php perch_content('Address'); // shared footer address ?>

    <?php perch_content('Footer Terms '); // shared footer terms ?>

    <?php echo date("Y"); ?>


    Address and Footer Terms are shared Perch content. It's usually the case this either never appears in the page list or can be deleted (with a copy replacement) which would not re-appear if the page was ever visited.


    I've never had Category, detail, 404 etc pages appear or keep re-appearing,

  • the 404.php shows....



    _get_content(): " style="font-family: Menlo, Inconsolata, Consolas, Courier, "Courier New", courier, fixed; font-size: 10px; color: seagreen;">[2]SELECT regionKey, regionHTML FROM perch3_content_regions WHERE regionPage='/404.php' OR regionPage='*' ORDER BY regionPage DESC
    get_value(): " style="font-family: Menlo, Inconsolata, Consolas, Courier, "Courier New", courier, fixed; font-size: 10px; color: seagreen;">[0]SELECT pageID FROM perch3_pages WHERE pagePath='/404.php' LIMIT 1
    _find_or_create_page(): " style="font-family: Menlo, Inconsolata, Consolas, Courier, "Courier New", courier, fixed; font-size: 10px; color: seagreen;">INSERT INTO perch3_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '/404.php' AS pagePath,'404' AS pageTitle,'404' AS pageNavText,1 AS pageNew,0 AS pageDepth,'2019-02-20 16:11:47' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch3_pages WHERE pagePath='/404.php' )=0 LIMIT 1
    create_new_regions(): " style="font-family: Menlo, Inconsolata, Consolas, Courier, "Courier New", courier, fixed; font-size: 10px; color: seagreen;">INSERT INTO perch3_content_regions(regionKey,regionPage,regionHTML,regionOptions,pageID) SELECT 'Footer Terms ' AS regionKey,'/404.php' AS regionPage,'<!-- Undefined content: Footer Terms -->' AS regionHTML,'' AS regionOptions,'28' AS pageID FROM (SELECT 1) AS dtable WHERE ( SELECT COUNT(*) FROM perch3_content_regions WHERE regionKey='Footer Terms ' AND (regionPage='/404.php' OR regionPage='*') )=0 LIMIT 1
    _reorder_keys(): " style="font-family: Menlo, Inconsolata, Consolas, Courier, "Courier New", courier, fixed; font-size: 10px; color: seagreen;">UPDATE perch3_content_regions SET regionOrder=0 WHERE regionPage='/404.php' AND regionKey='Address' LIMIT 1
    _reorder_keys(): " style="font-family: Menlo, Inconsolata, Consolas, Courier, "Courier New", courier, fixed; font-size: 10px; color: seagreen;">UPDATE perch3_content_regions SET regionOrder=1 WHERE regionPage='/404.php' AND regionKey='Footer Terms ' LIMIT 1