Forum
Single blog post page not showing, get 404 page
I'am setting up my blog and I keep getting a 404 page when I go to the single blog page which still gives me the incorrect URL (post.php?s=2017-06-15-title-of-post) although I have changed this in settings to /blog/[postSlug].
In post.php I am using
<?php perch_blog_post($post_slug); ?>
Perch Runway: 3.0.7, PHP: 7.1.6, MySQL: 10.0.30-MariaDB, with PDO
Server OS: Linux, litespeed
Installed apps: content (3.0.7), assets (3.0.7), categories (3.0.7), 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
Hi David
You probably want to use <?php perch_blog_post(perch_get('s')); ?> which grabs the slug string from the url. I'm not sure what $post_slug outputs.
Kind regards
Jon
That still gives me a 404 page. I got the $post_slug from here https://docs.grabaperch.com/video/v3/blog-detail-page/
Ok, so you've assigned the call to a variable first. Great.
What should the url of the blog post be? You say "2017-06-15-title-of-post" is wrong but that looks like a regular blog slug to me.
I see you're running Runway. Have you set up the pages yet? If Runway doesn't have a path to the pages it will throw a 404. It's not like vanilla Perch - further instructions here:
https://docs.grabaperch.com/addons/blog/runway/config/
Jon
Have you configured a route for your post page?
Yes I have set up the pages . Route
The blog URL still comes out with /post.php?s=2017-06-15-title-of-post although I have added the slug under settings
What value for post page URL do you have configured in Settings?
/blog/[postSlug] - Blog post page path
I think that should be
/blog/{postSlug}
That just gives me a blank page, with the url blog/post.php?s=2017-06-15-title-of-post
Where is that link coming from? Is it in your template?
No it is the browser URL. It is from the title of the post on the blog page. Click on that to go to single blog post.
Where did you get that URL?
https://robertsdesign.biz/blog/ https://robertsdesign.biz/blog/post.php?s=2017-06-15-title-of-post
Looks like you have multiple issues.
Was this working on your dev site before you put it live? It's almost like it's not been set up at all.
The wrong link is being output in your template. Check your template. Is this the post.php template?
Was this working on your dev site before you put it live? I followed this video for the set up https://www.youtube.com/watch?v=wrJ20AvZt5o. I don't have a dev site per say. I code it in Brackets. left the blog part to the end and wanted to the site up so it was live before the blog section was completed.
Which page is the link on? Looks like
/blog/index.php
to me. So a function call in that page will be using a template that outputs that link.How do I show the text from the blog page list page also on the single entry blog page. So the text on the blog list page carried over to the single blog article page?
Use the same template tags in your template. You need to have a development environment set up so you can test this stuff out.
You need to have a development environment set up so you can test this stuff out.
I agree totally. I have tried to set up a few, looked at lots but never managed to get anything to work. If there is something out there that looks and works with a GUI than say something like terminal. I give it another go.