Forum

Thread tagged as: Problem, Blog

Categories not showing up in Blog Post after update of Core then Blog.

OK, so we did all the usual.... did a recent update of CORE to 2.8.13, then Blog from 3.7.5. Just now also updated CORE to 2.8.14...

Added new categories template code to our post template, and checked categories app was in config, but no dice.

When we open an existing or new Blog Post, no categories show to select.

On debug, this shows:

SELECT * FROM perch2_categories c, perch2_category_sets s WHERE c.setID=s.setID AND s.setSlug='news' ORDER BY catTreePosition ASC

Note: our Category sets are "Blog" (blog) and "Main" (main). Is "news" a default slug? Is this related to issue?

APP versions: Perch: 2.8.14, PHP: 5.3.29, MySQL: 10.0.20-MariaDB, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.14), assets (2.8.14), categories (2.8.14), perch_blog (4.6), perch_forms (1.8.3), perch_mailchimp (1.0.1) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', ); ?>

Thanks.

Stuart Farrell

Stuart Farrell 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

No, news isn't default. Can you show us your template code?

This is our Post template:

<div class="content left">
    <article class="blog-post" data-cssgen>
        <p class="font-controls"><a href="#" class="bigger" title="Increase font size">A+</a> <a href="#" class="smaller" title="Decrease font size">A-</a></p>

        <p class="breadcrumb"><a href="index.php">Home</a> &gt; <a href="latest-issue.php">Latest</a> &gt; <perch:blog id="postDateTime" format="F, Y" /></p>

        <h2 class="<perch:blog id="font" /> <perch:blog id="colour" />"><perch:blog id="postTitle" /></h2>

        <perch:blog type="select" id="colour" label="Colour Theme" options="color1, color2, color3, color4, color5, color6, color7, color8, color9, color10, color11, color12" allowempty="false" required="true" suppress="true" order="4"/>

        <perch:blog type="select" id="font" label="Font Style" options="font-m, font-0, font-v, font-au, font-al" allowempty="false" required="true" suppress="true" order="4"/>

        <perch:blog type="checkbox" id="intro" value="1" label="Show Excerpt?" suppress="true" order="3" />
        <perch:if exists="intro">
        <h3 class="<perch:blog id="colour" />"><perch:blog id="excerpt" /></h3>
        </perch:if>

        <perch:if exists="video">
        <!-- Your Youtube Video Here -->
        <div class="video-holder">
            <!-- Copy & Pasted from YouTube - (Share -> Embed)  -->
            <iframe width="560" height="315" src="https://www.youtube.com/embed/<perch:blog id="video" type="text" encode="false" label="YouTube Embed Code" size="m" order="3" help="Copy and past ID from YouTube - Click on Share and Embed, only include the last part of embed ID." />" frameborder="0" allowfullscreen></iframe>
        </div><!-- /.video-holder -->
        </perch:if>

        <perch:if exists="audio">
        <!-- Your Soundcloud Track Here -->
        <div class="track-holder">
            <!-- Copy & Pasted from https://blog.soundcloud.com/2011/11/03/html5/  -->
            <iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/<perch:blog id="audio" type="text" encode="false" label="Sound Cloud Track ID" size="m" order="3" help="Only include the last part, track ID - Click on Share and Embed. EG: api.soundcloud.com/tracks/203227769"/>"></iframe>
        </div><!-- /.track-holder -->
        </perch:if>

        <perch:blog id="postDescHTML" type="textarea" encode="false" editor="tinymce" html="true" size="xl" order="4" required="true" />

        <perch:if exists="quote-1">
        <blockquote>
            <h3 class="<perch:blog id="font" /> <perch:blog id="colour" />"><perch:blog id="quote-1" type="text" encode="false" editor="tinymce" html="true" size="xl" label="Quote" /></h3>
            <perch:if exists="quote-1-credit">
            <h6>– <perch:blog id="quote-1-credit" type="text" encode="false" editor="tinymce" html="true" size="l" label="Quote Credit" /></h6>
            </perch:if>
        </blockquote>
        </perch:if>

        <perch:if exists="content-more-1">
        <perch:blog id="content-more-1" type="textarea" encode="false" editor="tinymce" html="true" size="xl" label="Extra Copy 1"/>
        </perch:if>

        <perch:if exists="image-1">
        <div class="image">
            <img src="<perch:blog id="image-1" type="image" width="446" crop="true" label="Image 1" />" alt="<perch:blog id="image-1-alt" type="text" encode="false" label="Image 1 ALT" size="m"/>" />
            <em class="caption"><perch:blog id="caption-1" type="text" label="Caption Image 1" size="xl"/></em>
        </div>
        </perch:if>

        <perch:if exists="content-more-2">
        <perch:blog id="content-more-2" type="textarea" encode="false" editor="tinymce" html="true" size="l" label="Extra Copy 2"/>
        </perch:if>

        <perch:if exists="image-2">
        <div class="image">
            <img src="<perch:blog id="image-2" type="image" width="446" crop="true" label="Image 2" />" alt="<perch:blog id="image-2-alt" type="text" encode="false" label="Image 2 ALT" size="m"/>"/>
            <em class="caption"><perch:blog id="caption-2" type="text" label="Caption Image 2" size="xl"/></em>
        </div>
        </perch:if>

        <perch:if exists="content-more-3">
        <perch:blog id="content-more-3" type="textarea" encode="false" editor="tinymce" html="true" size="l" label="Extra Copy 3"/>
        </perch:if>

        <perch:if exists="image-3">
        <div class="image">
            <img src="<perch:blog id="image-3" type="image" width="446" crop="true" label="Image 3" />" alt="<perch:blog id="image-3-alt" type="text" encode="false" label="Image 3 ALT" size="m"/>" />
            <em class="caption"><perch:blog id="caption-3" type="text" label="Caption Image 3" size="xl"/></em>
        </div>

        <perch:if exists="content-more-4">
        <perch:blog id="content-more-4" type="textarea" encode="false" editor="tinymce" html="true" size="l" label="Extra Copy 4"/>
        </perch:if>

        </perch:if>
        <perch:if exists="image-4">
        <div class="image">
            <img src="<perch:blog id="image-4" type="image" width="446" crop="true" label="Image 4" />" alt="<perch:blog id="image-4-alt" type="text" encode="false" label="Image 4 ALT" size="m"/>" />
            <em class="caption"><perch:blog id="caption-4" type="text" label="Caption Image 4" size="xl"/></em>
        </div>
        </perch:if>

        <div class="the-point <perch:blog id="colour" />" data-cssgen>
            <h5 class="title">The <strong>Point</strong></h5>
            <p class="<perch:blog id="font" />" data-vcenter><perch:blog id="the-point" type="text" encode="false" label="The Point" required="true" size="xl"/></p>
        </div>

        <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes">
            <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>

<perch:blog id="author-note" type="textarea" encode="true" label="Author Note" size="m" suppress="true"/>
<perch:blog id="references" type="textarea" encode="true" label="References" size="m" suppress="true"/>

<perch:blog id="stat-1-a" type="text" encode="false" html="true" label="Stat 1 Figure" size="m" order="5" suppress="true"/>
<perch:blog id="stat-1-b" type="text" encode="false" html="true" label="Stat 1" size="m" order="5" suppress="true"/>
<perch:blog id="stat-2-a" type="text" encode="false" html="true" label="Stat 2 Figure" size="m" order="5" suppress="true"/>
<perch:blog id="stat-2-b" type="text" encode="false" html="true" label="Stat 2" size="m" order="5" suppress="true"/>
<perch:blog id="stat-3-a" type="text" encode="false" html="true" label="Stat 3 Figure" size="m" order="5" suppress="true"/>
<perch:blog id="stat-3-b" type="text" encode="false" html="true" label="Stat 3" size="m" order="5" suppress="true"/>
<perch:blog id="stat-4-a" type="text" encode="false" html="true" label="Stat 4 Figure" size="m" order="5" suppress="true"/>
<perch:blog id="stat-4-b" type="text" encode="false" html="true" label="Stat 4" size="m" order="5" suppress="true"/>

<perch:blog id="authors_name" type="text" label="Authors Name" suppress="true" order="5" />
<perch:blog id="image" type="image" suppress="true" label="Home Page Thumb" order="5"/>
<perch:blog id="image-banner" type="image" suppress="true" label="Latest Page Banner" order="5" />
<perch:blog id="featured-image" type="image" suppress="true" width="1920" height="569" crop="true" label="Featured Image" order="5" />
<perch:blog id="postTitle-home" type="text" suppress="true" label="Article Title - Home" html="true" order="1" size="l" required="true" />
<perch:blog id="postTitle-short" type="text" suppress="true" label="Article Title - Short" html="true" order="1" size="m" required="true" />
<perch:blog id="excerpt" type="textarea" chars="100" suppress="true" label="Excerpt" order="2" sie="m" required="true" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

Everything looks like it's in order there. Can you show me the full debug?

OK, by magic it's fixed.... I think this is down to hosting caching??

Now we just have to adjust the front end filters to new variables etc. Will let you know if any issues here...

Thanks.

Actually, this bug was to do with wrong set being used in post.html template. We were using blog set but the code had set as news.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Which code?