Forum

Thread tagged as: Problem, Error, Blog

Blog posts not showing - get 404 page

Added 2 blog posts get the url for the post (blog/2017-05-31-title-goes-here) but get 404 page instead of article.

Perch Runway: 3.0.5, PHP: 7.1.5, MySQL: 10.0.30-MariaDB, with PDO
Server OS: Linux, litespeed
Installed apps: content (3.0.5), assets (3.0.5), categories (3.0.5), perch_blog (5.5.1), perch_forms (1.9), perch_gallery (2.8.9), perch_kraken (1.1), chirp_seo (1), perch_mailchimp (3.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', 'perch_gallery', 'perch_mailchimp', 'chirp_seo', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/robertsd/public_html/perch
PERCH_CORE: /home/robertsd/public_html/perch/core
PERCH_RESFILEPATH: /home/robertsd/public_html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 256M, Max POST 32M, Memory: 256M, Total max file upload: 32M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: robertsdesign.biz
DOCUMENT_ROOT: /home/robertsd/public_html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
David Roberts

David Roberts 0 points

  • 4 years ago

Hi.

Have you created the post page at blog/post and does it match the blog URL in settings.

Wayne

it maybe a routing issue. There is info in this post;

https://forum.grabaperch.com/forum/03-08-2017-runway-blog-404-on-post-pages

Thanks Wayne. The URL in settings is /blog/{postSlug} and the blog URL is/blog/2017-05-31-title-goes-here.

Using template: /templates/blog/post.html

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this resolved?

No, this is not working at all. Blog page just gets a 404 page message below.

Debug Message - Perch Runway 3.0.7
[11] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate, pr.routeOrder, s.settingValue AS siteOffline FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID LEFT JOIN perch2_settings s ON s.settingID='siteOffline' UNION SELECT NULL AS pagePath, pr2.routePattern, pr2.routeRegExp, pr2.templatePath AS pageTemplate, pr2.routeOrder, NULL AS siteOffline FROM perch2_page_routes pr2 WHERE templateID!=0 ORDER BY routeOrder ASC, pagePath ASC
Using master page: /templates/pages/errors/404.php
[4] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/errors/404' OR regionPage='*' ORDER BY regionPage DESC
Request time: 0.005
Process time: 0.005
Memory: 0.6233
Array
(
    [type] => 8
    [message] => Constant PERCH_SCHEDULE_SECRET already defined
    [file] => /home/robertsd/public_html/perch/config/config.php
    [line] => 8
)

Blog post debug page

Debug Message - Perch Runway 3.0.7
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='5c686420c4519ce2d93a19e0bf3029aa' LIMIT 1
UPDATE perch2_users SET userHash='8c7201af7edf6f4299829a47b9505656' WHERE userID='1'
[43] SELECT p.privKey FROM perch2_user_privileges p
[41] SELECT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC
[12] SELECT itemValue FROM perch2_menu_items WHERE itemType='app'
[0] SELECT COUNT(*) FROM perch2_blog_comments WHERE commentStatus='PENDING'
[1] SELECT * FROM perch2_blog_authors WHERE authorEmail='david@robertsdesign.biz' LIMIT 1
[1] SELECT * FROM perch2_blog_posts WHERE postID=2
[1] SELECT * FROM perch2_blog_sections ORDER BY sectionTitle ASC
[1] SELECT * FROM perch2_blogs ORDER BY blogTitle ASC
[1] SELECT * FROM perch2_blogs WHERE blogID=1 LIMIT 1
[1] SELECT * FROM perch2_blog_sections WHERE blogID='1' ORDER BY sectionTitle ASC
Using template: /templates/blog/post.html
Edit mode: edit
[1] SELECT * FROM perch2_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
[7] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
[1] SELECT itemTitle FROM perch2_menu_items WHERE itemType='app' AND itemValue='perch_blog' LIMIT 1
[1] SELECT * FROM perch2_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
[2] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC
File: /addons/apps/perch_blog/modes/edit.post.php
[1] SELECT * FROM perch2_resources WHERE resourceID='39' LIMIT 1
Array
(
    [w] => 600
    [h] => 285
    [target_w] => 600
    [target_h] => 
    [crop] => 
    [density] => 1
    [path] => rectangle-4-2-w600.jpg
    [size] => 91343
    [mime] => 
    [assetID] => 41
)
Queries: 19
Memory: 1.2344
Array
(
    [type] => 8
    [message] => Constant PERCH_SCHEDULE_SECRET already defined
    [file] => /home/robertsd/public_html/perch/config/config.php
    [line] => 8
)

Drew McLellan

Drew McLellan 2638 points
Perch Support

And you route is this?

blog/[slug:s]

Or something different?

Blog post page path is

/blog/{postSlug}
Rachel Andrew

Rachel Andrew 394 points
Perch Support

and the route?

On your post.php page in Perch, what is your URL route set to (in page options)? If nothing is there it should be something like;

blog/[slug:s]

and the route

it's not set. The only route set is the domain name (pattern) Home (page). Are these not set automatically by Runway.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Here are the Runway configuration docs for Blog: https://docs.grabaperch.com/addons/blog/runway/config/