Forum
Blog and categories update.
Ive come unstuck after following the instructions for updating the blog app and categories.
Blog posts are appearing fine and categories are working ok in the admin.
I have a list of blog post categories in the right hand column. 2 problems:
1) at the top of my site I have this error:
Warning: include(/home/oseaisla/public_html/perch/addons/apps/perch_categories/runtime.php): failed to open stream: No such file or directory in /home/oseaisla/public_html/perch/config/apps.php on line 6
Warning: include(): Failed opening '/home/oseaisla/public_html/perch/addons/apps/perch_categories/runtime.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/oseaisla/public_html/perch/config/apps.php on line 6
2) When I click on a category in the right hand column, it links to a page that gives this error:
Fatal error: Class 'PerchCategories_Categories' not found in /home/oseaisla/public_html/perch/addons/apps/perch_blog/runtime.php on line 503
Category links in right hand column, in index.php and post.php:
<div class="blog-themes">
<!-- Category listing -->
<?php perch_blog_categories(array(
'template' => 'category_link.html'
)); ?>
</div>
Markup in 'category_link.html
<perch:before>
<h3>Publication:</h3>
<ul>
</perch:before>
<li><a href="archive.php?cat=<perch:category id="catSlug" />"><perch:category id="catTitle" /> (<perch:category id="count.blog.post" />)</a></li>
<perch:after></ul></perch:after>
Diagnostics:
Perch is up to date PHP 5.5.10 is up to date MySQL 5.5.34 is up to date Image processing available SUMMARY INFORMATION
Perch: 2.8.4, PHP: 5.5.10, MySQL: 5.5.34, with PDO Server OS: Darwin, apache2handler Installed apps: content (2.8.4), assets (2.8.4), categories (2.8.4), perch_blog (4.6), perch_forms (1.7), perch_mailchimp (2.0.1), perch_backup (1.2) App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_forms/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_mailchimp/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_categories/runtime.php'); ?> PERCH_LOGINPATH: /perch PERCH_PATH: /Applications/MAMP/htdocs/05creative/osea/site/perch PERCH_CORE: /Applications/MAMP/htdocs/05creative/osea/site/perch/core PERCH_RESFILEPATH: /Applications/MAMP/htdocs/05creative/osea/site/perch/resources Image manipulation: GD (image sharpening disabled, #66714) PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M Resource folder writeable: Yes HTTP_HOST: localhost DOCUMENT_ROOT: /Applications/MAMP/htdocs/05creative/osea/site REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Your path to the Categories app is incorrect. It's in Perch Core, the same as content.
I'd suggest moving to the new format for apps.php as it saves you needing to know the paths.
Both methods are detailed in the documentation: https://docs.grabaperch.com/docs/installing-perch/installing-apps/
OK there is some progress but I'm still getting something wrong. Ive changed the format to this, as you suggested:
And it's linking correctly to the archive page, which has the 'Archive of:' heading, but underneath that its blank, not producing any archive posts
What's wrong now? Thanks
If you turn debug on, what does it output?
I get this is the admin
What do you get on the page?
This is the error on the empty archive page
And you definitely have posts in the category
blog/sunday-times/
?Hi Im picking up on this thread again. Someone else on here very kindly tried to help with it but ran into a dead end, so we still have no solution.
The situation is slightly improved in that I don't have the php error message appearing on the screen. I have shown debug reports below.
Basically, the list of categories on the right hand side of this page are linking to a blank archive page: https://oseaisland.co.uk/blog/
Here is the debug in the admin area...
On the blog homepage debug produces this...
On the archive.php page, debug produces this....
Within the blog admin area, each post has category checkboxes and most posts have been assigned to a category.
Please help! Thanks
Can anyone help please? Ive been advised that its possibly something to do with Perch blog cache because that shows up in the debug report above.....any ideas?
Thanks
You can test that by putting your site into development mode. Output isn't cached in that mode.
Drew, I have been helping Chris to troubleshoot this issue. I have tried as you suggested to put into Development Mode, but this did not correct the issue, but the cache error did go away.
Basically, on his archive page he is using
Which correctly outputs a list of Categories with a count for each item. The generated link to the archive is correct. When clicking on the link to an archive the function...
doesn't output anything, but if I add...
it is outputting the correct slug, but for some reason the function gives no output otherwise.
I totally re-installed all the default templates in templates/blog and also re-installed perch_blog app.
Drew, A critical step seems to have been over looked.... Just for the heck of it I added /update to the end of the url while in the blog app... and of course it ran the update, then the categories app gained a new Category... Blog, with lots of categories presumably from the existing blog posts.
Now, it's all working... to the best of my knowledge.
Was there somewhere in the doc's telling a person to run update? or... is this normally something that should have run automatically and just didn't happen?
Was there somewhere in the doc's telling a person to run update? or... is this normally something that should have run automatically and just didn't happen?
Robert, there was something in the docs about running an update in a particular kind of way if you are on a slightly older blog version, which I was. It was during that update process I came unstuck.
Anyway, I cannot thank you enough for your help with the issue. Im very grateful!
Hey Chris. If all is good now, go ahead and remove my access to perch and others. It was a pleasure to help and I hope everything goes smoothly from here.