Forum

Thread tagged as: Problem, Blog

Blog not updating

The blog I am testing has stopped updating when I make changes to the blog listing template file "post_in_list.html". The blog template file are in "cms/templates/content/blog/". I am trying to edit the "post_in_list" template to output a 850px by 350px image with a class of "thumbnail" but the output image is 50px by 50px. Republishing pages option doesn't work, neither does relogging into the CMS or restarting the server (MAMP Pro v5.0.3). I also made sure the reference to image tag in "cms/templates/content/blog/post.html" matched the one used in "cms/templates/content/blog/post_in_list.html".

Your template: post_in_list

<perch:before> <ul class="hfeed listing"></perch:before> <li class="hentry blog-post"> <h3><a href="<perch:blog id="postURL" />" rel="bookmark" class="entry-title"><perch:blog id="postTitle" /></a><small><time class="entry-published date"><perch:blog id="postDateTime" format="%d %B %Y" /></time></small></h3> <perch:if exists="image"><img class="thumbnail" src="<perch:blog id="image" type="image" width="850" height="350" />" alt="<perch:blog id="postTitle" />" /><perch:else/><img class="thumbnail" src="https://placehold.it/850x350"></perch:if> <div class="description entry-summary"> <perch:blog id="excerpt" type="textarea" /> <div class="callout"> <ul class="menu simple"> <perch:if exists="authorGivenName"><li><a href="#"> Author: <perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></a></li></perch:if> <perch:if exists="commentID"><li><a href="#">Comments: <perch:blog id="postCommentCount"/></a></li></perch:if> </ul> </div> </div> </li> <perch:after> </ul> <perch:if exists="paging"> <div class="paging"> Page <perch:blog id="current_page" /> of <perch:blog id="number_of_pages" /> <perch:blog id="page_links" encode="false" /> <perch:if exists="not_first_page"> <a href="<perch:blog id="prev_url" encode="false" />">Previous</a> </perch:if> <perch:if exists="not_last_page"> <a href="<perch:blog id="next_url" encode="false" />">Next</a> </perch:if> </div> </perch:if> </perch:after>

The blog page (/blog/index.php) used this function to render the list:

<?php perch_blog_recent_posts(10); ?>

And it produced this html:

<ul class="hfeed listing"> <li class="hentry blog-post"> <h3><a href="/blog/post.php?s=2018-08-08-estibulum-felis-ante-porta-finibus-tellus-nec-pharetra-lacinia-mauris-vivamus-placerat-sem" rel="bookmark" class="entry-title">estibulum felis ante, porta finibus tellus nec, pharetra lacinia mauris. Vivamus placerat sem</a><time class="entry-published date">08 August 2018</time></h3> <img src="/cms/resources/kitten850x350-1-w50h50.jpeg" alt="estibulum felis ante, porta finibus tellus nec, pharetra lacinia mauris. Vivamus placerat sem"> <div class="description entry-summary"> <p>Vestibulum felis ante, porta finibus tellus nec, pharetra lacinia mauris. Vivamus placerat sem ultrices viverra suscipit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed gravida sagittis diam vitae molestie. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> <p>Comments: 0</p> </div> </li> </ul>

Diagnostic Report

Perch: 3.1.1, PHP: 7.2.7, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $, with PDO Server OS: Darwin, apache2handler Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_forms (1.11) App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_forms']; PERCH_LOGINPATH: /cms PERCH_PATH: /Users/tfdigital-1/Sites/perch-demo/cms PERCH_CORE: /Users/tfdigital-1/Sites/perch-demo/cms/core PERCH_RESFILEPATH: /Users/tfdigital-1/Sites/perch-demo/cms/resources Image manipulation: GD PHP limits: Max upload 32M, Max POST 8M, Memory: 128M, Total max file upload: 8M F1: 3b606135b33e6a102526838f4152a807 Resource folder writeable: Yes HTTP_HOST: perch-demo:8888 DOCUMENT_ROOT: /Users/tfdigital-1/Sites/perch-demo REQUEST_URI: /cms/core/settings/diagnostics/ SCRIPT_NAME: /cms/core/settings/diagnostics/index.php

Neal Hanson

Neal Hanson 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The blog template file are in "cms/templates/content/blog/".

They should be in cms/templates/blog/

Thanks.