Forum

Thread tagged as: Question, Problem, Blog

No longer able to enter Tags for Perch Blog App from Admin form

I had not noticed that when I upgraded to the Blog App from 4.6 to 5.0 I lost the Tags field. I have postTags data on a blog that was entered in March but no longer have the field displayed in the admin form to enter a Tag. I looked back at backups of old post.html templates and find no references to postTags . Do I need to add something to my post.html template to enter Tags for my blogs now? If so what? Thank you. Sue Stewart

Sue Stewart

Sue Stewart 0 points

  • 5 years ago

The post tags should be editable in the Meta and Social tab for each blog post. Do you see them there?

See https://grabaperch.com/blog/archive/perch-blog-5-0-facebook-open-graph-twitter-cards-and-multiple-blogs for a bit more about the changes in Blog 5.0 and the Meta and Social tab.

I do not see a meta and social tab. Do I need to do anything to have it appear?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report with each post to the forum - thanks!

Diagnostics report HEALTH CHECK

Perch is out of date. You are running Perch 2.8.30 and the latest is 2.8.31. Update instructions PHP 5.5.34 is up to date MySQL 5.6.30 is up to date Image processing available File upload size is low. You can only upload files up to 2M. Memory limit is low. Memory use is limited to 32M, which could cause problems manipulating large images. SUMMARY INFORMATION

Perch: 2.8.30, PHP: 5.5.34, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, with PDO Server OS: Linux, apache2handler Installed apps: content (2.8.30), assets (2.8.30), categories (2.8.30), perch_blog (5.0), perch_events (1.7.1), perch_gallery (2.8.6), perch_news (4.6), perch_backup (1.2) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_news', 'perch_events', 'perch_gallery'); ?> PERCH_LOGINPATH: /perch PERCH_PATH: /home/casttester/public_html/perch PERCH_CORE: /home/casttester/public_html/perch/core PERCH_RESFILEPATH: /home/casttester/public_html/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 2M, Max POST 8M, Memory: 32M, Total max file upload: 2M F1: 2edba60ed1f613d6dd804feb202456a2 Resource folder writeable: Yes HTTP_HOST: www.cast-inc.com DOCUMENT_ROOT: /home/casttester/public_html REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

And here is my template


<title><perch:blog id="postTitle"> by CAST, Inc.</title> <style type="text/css"> .blogaddthis img{ margin: 0px; padding: 0px; } </style> <article class="h-entry"> <h1> <a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark" class="p-name"> <perch:blog id="postTitle" type="textarea" label="Title" required="true" editor="markitup" size="xs autowidth" order="2" count="chars"/> </a> </h1> <p class="meta"> <time class="dt-published" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Meta information" />"> <perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" /> </time> <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> </p> <perch:if exists="image"> <div> <img src="<perch:blog id="image" type="image" width="320" height="240" crop="true" label="Post Image" order="3" />" alt="<perch:blog id="postTitle" />" /> </div> </perch:if> <perch:blog id="thumbnail-image" type="image" label="Thumbnail Image (50x50)" width="50" height="50" order="4" suppress="true" /> <div class="description e-content"> <perch:blog id="postDescHTML" type="textarea" label="Post" order="1" editor="ckeditor" html="true" /> </div> </article> <perch:blog id="excerpt" type="textarea" label="Meta Description / Excerpt" editor="markitup" markdown="false" order="5" suppress="true" count="chars" size="s"/> <perch:blog id="metaKeywords" type="textarea" label="Meta Keywords" editor="markitup" markdown="false" order="6" suppress="true" count="chars" size="s"/> <perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

It doesn't look like you have them in your template. Can you add them back in?

I never had tags defined in the template for previous versions. They seemed to come my default. I am not finding an example of the syntax to add tags to my template. Could you please give me an example? In my database I find two id's for tags - Should the id in post.html be "tagSlug" or "postTags"?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Have you looked at the example templates and files that you download with the updated addon, they are present in those files.

I have and I do not see an example. I assume you want me to find the example code in the supplied post.html. I will include that code below. I do not see an example input for the tag field.

I do see an example to list the associated tags in the file post_tag_link.html. I need an example to add a way to enter tags associated with a blog to post.html so the tags can be entered via the admin. We have not changed our post.html template and in prior versions of the blog the tag field showed in the admin without being in the post.html template so I assume something has changed in the new blog version.

Supplied post.html template

<article class="h-entry">
    <h1>
        <a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark" class="p-name">
            <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" />
        </a>
    </h1>
    <p class="meta">
        <time class="dt-published" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Publishing" />">
            <perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" /> 
        </time>
        <perch:if exists="authorGivenName">
            by <span class="p-author h-card"><perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></span>
        </perch:if>    
        <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>

    </p>
    <perch:if exists="image">
        <div>
            <img src="<perch:blog id="image" type="image" width="320" height="240" crop="true" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" />
        </div>
    </perch:if>
    <div class="description e-content">
        <perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="markitup" markdown="true" size="xxl autowidth" required="true" />
    </div>
</article>

<perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="3" suppress="true" size="s" />
<perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you see the Meta and Social tab when editing a post?

Problem solved. The tabs do not show until the draft is saved so I did not see them. Thank you for your help. Sue