Forum

Thread tagged as: Problem, Error, Blog

Blog posts not showing.

When I try and post to the blog nothing is happing. When I hit publish it just gives me a blank screen and when you reload the page it just goes back to the blog post.

Perch: 2.8.25, PHP: 5.4.45, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.25), assets (2.8.25), categories (2.8.25), perch_blog (4.1), perch_events (1.9), perch_forms (1.7), perch_backup App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_events/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_forms/runtime.php'); ?> PERCH_LOGINPATH: /perch PERCH_PATH: /home4/swimkint/public_html/perch PERCH_CORE: /home4/swimkint/public_html/perch/core PERCH_RESFILEPATH: /home4/swimkint/public_html/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M F1: dc1fef2ad0fcd9f943c02ebb43d85dbc Resource folder writeable: Yes SCRIPT_NAME: /perch/core/settings/diagnostics/index.php REQUEST_URI: /perch/core/settings/diagnostics/ DOCUMENT_ROOT: /home4/swimkint/public_html HTTP_HOST: swimkintyre.org

David Roberts

David Roberts 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You need to update to the current version of the Blog App.

Ok, thanks

I have updated the blog app and a couple of things are not working correctly. There is a excerpt on the home page which is not showing/blank homepage_post_in_list.html and the archive categories is not showing correctly either. when you click on archive news you just get a blank page.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

We would need to see your template and current Diagnostics Report.

Also, if you are getting a blank page then you have a PHP error, you need to look in the error log to see what it is.

What I meant by a blank page was that there is no text were the archive news should be but the rest of the page is ok.

Perch: 2.8.25, PHP: 5.5.31, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.25), assets (2.8.25), categories (2.8.25), perch_blog (5.0), perch_events (1.9.2), perch_forms (1.7), perch_backup
App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_events/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_forms/runtime.php'); include(PERCH_PATH.'/addons/apps/categories/runtime.php'); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /home4/swimkint/public_html/perch
PERCH_CORE: /home4/swimkint/public_html/perch/core
PERCH_RESFILEPATH: /home4/swimkint/public_html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M
F1: dc1fef2ad0fcd9f943c02ebb43d85dbc
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /home4/swimkint/public_html
HTTP_HOST: swimkintyre.org       

homepage_post_in_list.html

       <perch:before>
</perch:before>
<span class="subhead"><a href="news.html/post.php?s=<perch:category id="postSlug" />" rel="bookmark" class="entry-title"><perch:category id="postTitle" /></a></span>
<span class="main_text"><perch:category id="excerpt" type="textarea" label="blog excerpt" textile="true" /></span>
<perch:after>
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Perch is out of date, please make sure everything is up to date before posting to the forum.

Your template looks broken unless that's a copy and paste error, you have empty perch:before tags and an unclosed perch:after.

Updated Perch, fixed template - same problem.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

What does your template now look like?

What do you see in debug if you turn that on?

The more complete info you can give us the more likely we are able to help.

The posts are still not showing on the home page. The URL for some reason has a forward slash at the end while every other URL does not. The footer has seemed to have disappeared on the main blog page When you view the post as a single item you get the tile of the post as the title and as a link at the bottom of the post. When you click on it is takes you to the archive page. This should be in the right column under achieve.

Under Perch Blog

Debug Message
[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='b9498bc1b84dafa01a103fa17ec75806' LIMIT 1
UPDATE perch2_users SET userHash='72fb119a82773d2908fa82a2ce37a1ba' WHERE userID='1'
[44] SELECT p.privKey FROM perch2_user_privileges p
[40] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT * FROM perch2_blogs ORDER BY blogTitle ASC
[1] SELECT * FROM perch2_blogs WHERE blogID=1 LIMIT 1
[3] SELECT * FROM perch2_categories c, perch2_category_sets s WHERE c.setID=s.setID AND s.setSlug='blog' ORDER BY catTreePosition ASC
[1] SELECT * FROM perch2_blog_sections WHERE blogID=1 ORDER BY sectionTitle ASC
[15] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_blog_posts WHERE blogID=1 ORDER BY postDateTime DESC LIMIT 0, 15
[1] SELECT FOUND_ROWS() AS count
[0] SELECT COUNT(*) FROM perch2_blog_comments WHERE commentStatus='PENDING'
Queries: 12
Memory: 2.6307
Drew McLellan

Drew McLellan 2638 points
Perch Support

That looks like debug output from the control panel. What does it output for your page that you're having problems with?

This is from the home page (control panel ) I don't get anything from the actual home page on the site or from any other page.

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='e6b284bfac1705a423c21fb65adac898' LIMIT 1 UPDATE perch2_users SET userHash='e7d3c8040f7edaf808f00ff1d42b160f' WHERE userID='1' [44] SELECT p.privKey FROM perch2_user_privileges p [40] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID [1] SELECT * FROM perch2_pages WHERE pageID=14 LIMIT 1 [3] SELECT * FROM perch2_content_regions WHERE pageID=14 AND regionPage!='' ORDER BY regionOrder ASC [1] SELECT COUNT() FROM perch2_content_items WHERE itemJSON!='' AND regionID=22 AND itemRev=6 [1] SELECT COUNT() FROM perch2_content_items WHERE itemJSON!='' AND regionID=23 AND itemRev=5 [1] SELECT COUNT() FROM perch2_content_items WHERE itemJSON!='' AND regionID=32 AND itemRev=11 Queries: 10 Memory: 2.4463

Rachel Andrew

Rachel Andrew 394 points
Perch Support

You need to enable debug and add output debug on that page to see debug.

The control panel debug is not helpful when it is output on your site that is the issue.

https://docs.grabaperch.com/docs/installing-perch/configuration/debug/

Array ( [type] => 2 [message] => include() [function.include]: Failed opening '/home4/swimkint/public_html/perch/addons/apps/categories/runtime.php' for inclusion (include_path='.:/usr/local/php53/lib:/usr/lib/php:/usr/local/lib/php') [file] => /home4/swimkint/public_html/perch/config/apps.php [line] => 6 )

from the news.html page Array ( [type] => 2 [message] => Cannot modify header information - headers already sent by (output started at /home4/swimkint/public_html/news.html/index.php:2) [file] => /home4/swimkint/public_html/perch/core/lib/PerchUtil.class.php [line] => 1219 )

Drew McLellan

Drew McLellan 2638 points
Perch Support

In your config/apps.php you have this:

include(PERCH_PATH.'/addons/apps/categories/runtime.php');

Is that a custom app of some sort, or a mistake?

I'd suggest replacing the contents of your config/apps.php entirely with the following.

<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_events',
        'perch_forms',
    );

Did that.It Made no difference on the home page, I am getting this debug message:

SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/index.html' OR regionPage='*' ORDER BY regionPage DESC