Forum

Thread tagged as: Problem, Addons, Blog

Blog Update Has Stopped Posts Displaying

Hi

This may be a simple case of something wrong on a template i've upgraded to the latest perch core and the latest blogs app, i updated from an old blogs app and think i followed all the installation instructions properly.

The full posts aren't displaying anymore, i can see the data is there in the database and lists of posts show up just the full version doesn't render.

From the diagnostics i can see the correct sql is running and returns the correct data but it just doesn't render so i think there must be something wrong with the template but i can't see what (may be a case of me not seeing the wood for the trees).

This is the template code:

<h1 class="h1" itemprop="headline"><a href="<perch:blog id="postURL" type="hidden" label="Title"/>" rel="bookmark" class="entry-title"><perch:blog id="postTitle" type="text" required="true" size="xl" label="Title" order="1" /></a></h1>

<div class="author-text"><time itemprop="datePublished" datetime="<perch:blog id="postDateTime" format="%Y-%m-%d." type="date" label="Date" time="true" order="11"/>"><perch:blog id="postDateTime" format="%d.%m.%Y" label="Date"/></time><span class="updated"><time itemprop="dateModified" datetime="<perch:blog id="postDateTime" format="%Y-%m-%d." label="Date" />"></time> by <a href="<perch:blog id="google-link" type="hidden" label="Google Link"/>" itemprop="author" title="Written by <perch:blog id="authorGivenName" type="hidden" label="Author"/>" rel="author" target="_googleplus" class="fn"><perch:blog id="authorGivenName" type="hidden" label="Author" /></a></div>

<perch:if exists="image"> <section class="blog-banner"> <img src="<perch:blog id="image" type="image" label="Banner Image" width="1264" height="704" crop="true" help="This image should be 1264 x 704" order="2" bucket="blog" />" alt="<perch:blog id="postTitle" />" /> </section> </perch:if>

<section class="blog-text clearfix" itemprop="articleBody"> <perch:blog id="postDescHTML" type="textarea" html="true" editor="ckeditor" required="true" size="xl" imagewidth="1264" label="Main Article" order="3" bucket="blog"/> </section>

<perch:blog id="excerpt" type="textarea" label="Excerpt" html="false" required="true" order="4" suppress="true" size="s" divider-before="List Page Content"/> <perch:blog id="list-image" type="image" width="480" height="240" crop="true" suppress="true" label="Listing Image" help="This image should be 480 x 240" order="5" />

<perch:blog id="meta-title" type="textarea" label="Meta Title" html="false" required="true" order="6" suppress="true" size="s" divider-before="Meta/SEO Content" /> <perch:blog id="meta-keywords" type="textarea" label="Meta Keywords" html="false" order="7" suppress="true" size="s" /> <perch:blog id="meta-description" type="textarea" label="Meta Description" html="false" required="true" order="8" suppress="true" size="s" /> <perch:blog id="h1-tag" type="text" label="H1 Tag" html="false" required="true" order="9" suppress="true" size="xl" />

<meta property="og:title" content="<perch:blog id="postTitle" escape="true" label="Title"/>"/> <meta property="og:type" content="article"/> <meta property="og:image" content="<perch:blog id="base-url" type="hidden" /><perch:blog id="list-image" label="image"/>"/> <meta property="og:url" content="<perch:blog id="base-url" type="hidden" /><perch:blog id="postURL" type="hidden" label="url"/>"/> <meta property="og:description" content="<perch:blog id="excerpt" escape="true" label="excerpt"/>"/>

<meta name="twitter:card" content="summary"> <meta name="twitter:url" content="<perch:blog id="base-url" type="hidden" /><perch:blog id="postURL" type="hidden" label="url"/>"> <meta name="twitter:title" content="<perch:blog id="postTitle" escape="true" label="Title"/>"> <meta name="twitter:description" content="<perch:blog id="excerpt" escape="true" label="excerpt"/>"> <perch:if exists="twitter-image"> <meta name="twitter:image" content="<perch:blog id="base-url" type="hidden" /><perch:blog id="twitter-image" type="image" label="Twitter Image" width="120" height="90" crop="true" help="This image should be 120 x 90" order="10" bucket="blog" />"> </perch:if> <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes"> <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />"> <perch:category id="catTitle" type="text" /> </a> </perch:categories>

And this is the debug output there is an a complaint at the end about an undefined variable not sure if that would be causing it:

Debug Message SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='2015-05-06-five-images-youll-wish-you-could-unsee-nature-polluted')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2015-05-06 16:37:00' ) GROUP BY itemID ORDER BY sortval ASC LIMIT 0, 10 SELECT FOUND_ROWS() AS count SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0 Using template: \templates\blog\post.html SELECT * FROM perch2_blog_sections ORDER BY sectionTitle ASC SELECT catID, catPath FROM perch2_categories SELECT * FROM perch2_blog_posts WHERE postStatus='Published' AND postDateTime<='2015-05-06 16:37:00' AND postSlug='2015-05-06-five-images-youll-wish-you-could-unsee-nature-polluted' Using template: \templates\blog\post.html Using template: \templates\blog\post.html Using template: \templates\blog\post.html SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/blog/post.php' OR regionPage='*' ORDER BY regionPage DESC Using template: \templates\blog\post.html SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageDepth >=0 AND pageDepth<=1 ORDER BY pageTreePosition ASC SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/blog/post.php' LIMIT 1 SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-006-003', '000-006', '000') Using template: \templates\navigation\item.html SELECT main.* FROM perch2_blog_posts main WHERE main.postID=432 LIMIT 1 Using template: \templates\blog\post.html Fetching from cache: perch_blog_post_categories80770e1a3914f5a17f871856cdcf510d SELECT * FROM perch2_categories WHERE catID=1 LIMIT 1 SELECT * FROM perch2_categories WHERE catID=5 LIMIT 1 Caching: perch_blog_post_categories80770e1a3914f5a17f871856cdcf510d SELECT idx.itemID FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' AND (idx.indexKey='_category' AND idx.indexValue LIKE 'blog/general/%' OR idx.indexKey='_category' AND idx.indexValue='blog/general/') OR (idx.indexKey='_category' AND idx.indexValue LIKE 'blog/ads-of-week/%' OR idx.indexKey='_category' AND idx.indexValue='blog/ads-of-week/') SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch2_blog_index idx JOIN perch2_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch2_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' AND idx.itemID IN ('213', '327', '328', '330', '331', '336', '339', '340', '342', '343', '346', '352', '359', '362', '363', '364', '365', '366', '367', '369', '370', '373', '374', '375', '377', '389', '391', '392', '394', '395', '396', '397', '398', '399', '425', '430', '432') WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue != '2015-05-06-five-images-youll-wish-you-could-unsee-nature-polluted')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2015-05-06 16:37:00' ) GROUP BY itemID ORDER BY sortval DESC LIMIT 0, 3 SELECT FOUND_ROWS() AS count Using template: \templates\blog\related_articles.html SELECT * FROM perch2_blog_posts WHERE postID=432 AND postStatus='Published' AND postDateTime<='2015-05-06 16:37:00' Using template: \templates\blog\comment_form.html SELECT * FROM perch2_blog_comments WHERE 1=1 AND postID=432 AND commentStatus='LIVE' ORDER BY commentDateTime ASC Using template: \templates\blog\comment.html Fetching from cache: perch_blog_date_archive_years8020c9cc794c6ec9bc919b1b53a6c73d SELECT groupID FROM perch2_navigation WHERE groupSlug='footer-menu' LIMIT 1 SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=2 AND p.pageNew=0 AND np.pageDepth >=0 AND np.pageDepth<=1 ORDER BY np.pageTreePosition ASC SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=2 AND p.pagePath='/blog/post.php' LIMIT 1 Using template: \templates\navigation\item.html

Array ( [type] => 8 [message] => Undefined variable: items [file] => C:\xampp\htdocs\zulu\admin\core\lib\PerchFactory.class.php [line] => 1131 )

Any advice would be helpful

James Newton

James Newton 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which version did you update to and from?

Hi Drew,

Sorry for the delay i got side tracked and had forgotten to check email notifications when i posted this.

I updated the core from 2.7.10 to 2.8.6

and the blog was 4.1 and updated to 4.6

Drew McLellan

Drew McLellan 2638 points
Perch Support

Did you follow the blog update instructions? There were template changes around Blog 4.5 I think.

Yes i followed the changes to categories and made sure all the tags had type and labels.

I did make a change to the template after the update not sure if that would have caused an issue, I'll try rolling back the database tomorrow and let the update run again and let you know if i still get the same issue.