Forum

Thread tagged as: Installation, Runway

Runway Upgrade - Sorry, that page could not be found

Hi

I'm getting a "Sorry, that page could not be found." error after upgrading to Runway and trying to access the home page.

  1. Removed my index.html page from the root
  2. Created a master template page and assigned to home page in the admin and set the path to "/".
  3. Removed the Runtime code from the master template (as runway adds it automatically)
    1. Made sure mod_rewrite is enabled and created a .htaccess file in the root with the following...
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/login 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /login/core/runway/start.php [L] 

I'm on a Mac OS X 10.10 using preinstalled Apache.

Any help and advice would be appreciated.

Dan Lee

Dan Lee 1 points

  • 6 years ago
# Perch Runway
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/perch 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /perch/core/runway/start.php [L] 

Dan, Did you rename perch to login? Otherwise your .htaccess should be above.

Dan. Make sure ...

RewriteEngine On
Dan Lee

Dan Lee 1 points

Thanks for replying Robert,

Yes "perch" was renamed to "login".

RewriteEngine On line is in the .htaccess file.

Dan

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is the 404 page from Runway or your server or your browser?

Dan Lee

Dan Lee 1 points

Hi Drew,

It looks like a Perch 404. It is using the template file in templates/pages/errors/404.php

What is the extension on your template page. Did you use PHP or did you use HTML?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you turn debug on and let me know what it outputs on the 404 page?

Add the following line to your perch/config/config.local.php file.

define('PERCH_DEBUG', true);
Dan Lee

Dan Lee 1 points

@Robert the extension is .php

@Drew - the debug output is below...

I had a look and perch2_page_routes table doesn't exist in the database - any idea why?

Time    Δ   Debug Message
1.0432  0   SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC
1.3858  0.3426  Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bell.perch2_page_routes' doesn't exist
1.3859  0.0001  Using master page: /templates/pages/errors/404.php
1.3859  0   Page arguments:
1.4055  0.0195  SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/errors/404' OR regionPage='*' ORDER BY regionPage DESC
1.6027  0.1972  Time: 1.6026
1.6027  0   Memory: 4.0919
Dan Lee

Dan Lee 1 points

I believe I have found the solution for any other Canaries out there having the same issue. :)

The Problem:

404 error appearing on pages that exist in the admin (no physical file) which have a master template. Looking at the debug output the perch2_page_routes table was not in the database (not sure why currently).

The Solution:

Force a update to Runway by typing this in address bar...

/perch/core/update/?force=update

The table is added to the database and pages start to work.

Dan, Was this a fresh install of Runway, or an update from Perch 2?

Dan Lee

Dan Lee 1 points

It was an update from Perch 2.

As you can imagine, Building new software is an evolving process. Continually updating existing software can be a nightmare, now add the 2 together and you've got a heck of a mess to sort out.

Well, as you see sometimes updates fail for one reason or another and Perch is no exception to this rule.

Drew and Rachel have done an AWESOME job in making upgrades and updates as painless as possible, but for those times when everything doesn't work out the first time they have special ways to re-update.

There are so many scenarios that can cause an update to fail, for this reason there is always the trusty BACKUP which is often the thing most fail to do before taking on such an adventure as updating.

I am glad to see everything is now working... and wish you lots of happy hours coding away and designing your next project.

Cheers, :)

Robert Ketter Fellow Percher