Forum
Deleted regions not re-appearing again
I have a single page website which had around 7/8 editable Perch regions on it. The client made a mess of their Perch admin page and now there are no regions available! (Although the site still is still strangely displaying perch content). The message I get is: No content yet? Make sure you have added some editable regions into your page, and then visited that page in your browser. Once you have, the regions should show up here.
I've refreshed/deleted browser cache; no joy, I've re-uploaded my offline copy of /index.php and hoped Perch would re-pickup available regions after page refresh; no joy, I've re-uploaded all the perch content templates again; no joy. I've updated Perch; no joy. I've tried republishing pages; no joy.
What am I doing wrong?
Summary information
Perch: 3.1.1, PHP: 7.1.16, MySQL: 5.6.39, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1)
App runtimes: <?php $apps_list = [ ];
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/vhosts/87/908905/webspace/httpdocs/bespokebuild.ie/perch
PERCH_CORE: /var/www/vhosts/87/908905/webspace/httpdocs/bespokebuild.ie/perch/core
PERCH_RESFILEPATH: /var/www/vhosts/87/908905/webspace/httpdocs/bespokebuild.ie/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 256M, Total max file upload: 32M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: www.bespokebuild.ie
DOCUMENT_ROOT: /var/www/vhosts/87/908905/webspace/httpdocs/bespokebuild.ie
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Is Ctrl-E to Edit enabled?
Hi Drew, it wasn't so I enabled it, saved and checked again; still no joy.
Have you tried invoking it from the page?
I don't know what that means?
Once Ctrl-E is enabled, go to the page on your website with the content and press Ctrl-E.
Hi Drew, I've tried that and it hasn't made any difference (I'm on a Mac btw, so I tried both Ctrl-E & Cmd-E) It's a single page simple website. As a test, I decided to copy the /index.php and rename /index2.php and upload this to server to se if this regions get pulled in for this page. When I did this; It picks up the /index2.php page on Perch but has not regions underneath it. It also picks up 3 other pages (not mine!), that presumably this customer tried to create using the 'Add Page' button on the top righthand side of the screen, even though I hadn't enabled the pages app template for this site. When I try and delete any of these 3 pages, Perch simply kicks me out to login screen. Should I reinstall Perch completely here? I've turned on Debug, but nothing jumps out;
How are your regions declared in the page?
They are declared within the individual editable div areas.
<?php perch_content('Gallery'); ?> <?php perch_content('Testimonials'); ?>
This website was working perfect as was, so I doubt it's the regions code that's the root cause. It's strange that the gallery images (which are obviously declared through Perch) are still holding on the website, almost like they are in a cached state.
If you turn on debug on the front-facing page, what does it output?
The front facing page (/index.php) is not being picked up on Perch at all as a page. The test identical duplicate of this page (/index2.php) is reporting the below:
But you can add debug to see what it outputs, right?
No, the debug you see above is from /index2.php. This is the exact same file, just renamed. It is getting picked up in Perch (along with 3 other pages). It's not picking it's regions up though and I cannot delete any of these pages.
Duplicating the file doesn't help with a data issue. I need to see the debug output from
/index.php
.Hi Drew. I cannot create the /index.php on Perch, so I cannot provide the debug. I have the file (/index.php) offline and if I copy over a new copy of this file to the server and refresh the website, it doesn't get picked up? If I copy/paste/rename this file to be /index2.php it does get picked up but is not working right either?
Does
/index.php
no longer exist as the homepage of your website? I know you can't see it in the control panel, but that isn't necessary to add the debug code to the file, and will help us get to that point.Anything you do with
index2.php
is no help at this stage, as we're not trying to debug a working page, we're trying specifically to debugindex.php
.Hi Drew. It would appear that the original database became corrupted somehow... possibly because they had admin rights and tried adding a page that they didn't have the ability to do. I have since revoked this and given them Editor rights. Truth be told, I have no idea what they did or how it ended up behaving/corrupting like this. Anyway, I decided to create a new database on the server and update the config file, re-setup Perch and rebuild the page. Fixed now (the hard way!) Thanks.