Forum

Thread tagged as: Redactor, CKEditor, Field-Types

Textarea on template shows tags

I recently upgreaded our blog, but now in the template the user sees, the tags show up as text and not as tags.

<p>This is a sentence</p>

literally displays as <p>This is a sentence</p>

The tag in the view is this:

<perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="redactor" size="xxl autowidth" required="true" />

and the tag in the template is this:

<?php perch_blog_post(perch_get('s')); ?>
John Briggs

John Briggs 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can we see your diagnostics report and your template please?

Post Template:

<div class="hentry">
    <h2 class="post-title"><perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" /></h2>

    <div class="entry-published date">
        <span class="month"><perch:blog type="date" time="true"id="postDateTime" format="%B" /></span>
        <span class="day"><perch:blog id="postDateTime" format="jS" /></span>,
        <span class="year"><perch:blog id="postDateTime" format="%Y" /></span>
    </div>

    <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="redactor" size="xxl autowidth" required="true" html="true"/>
    </div>
</div>

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

Page for the view:

<?php include('../perch/runtime.php'); ?>

<?php 
    perch_layout('global.header', array(
        'class' => 'blog post'
    ));
?>


        <div class="blog-post">
            <?php perch_blog_post(perch_get('s')); ?>

                <div id="disqus_thread"></div>
                <script type="text/javascript">
                    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
                    var disqus_shortname = 'helmstargroup'; // required: replace example with your forum shortname

                    /* * * DON'T EDIT BELOW THIS LINE * * */
                    (function() {
                        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
                        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
                        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
                    })();
                </script>
                <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
                <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>


        </div>

        <nav class="sidebar">

            <section class="archives">

                <h2>Archive</h2>
                <!-- The following functions are different ways to display archives. You can use any or all of these. 

                All of these functions can take a parameter of a template to overwrite the default template, for example:

                perch_blog_categories('my_template.html');

                --> 
                <!--  By category listing -->
                <?php perch_blog_categories(); ?>
                <!--  By tag -->
                <?php perch_blog_tags(); ?>
                <!--  By year -->
                <?php perch_blog_date_archive_years(); ?>
                <!--  By year and then month - can take parameters for two templates. The first displays the years and the second the months see the default templates for examples -->
                <?php perch_blog_date_archive_months(); ?>
            </section>

        </nav>

<?php perch_layout('global.footer'); ?>

Diagnostics

Perch: 2.8.29, PHP: 5.4.45, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_blog (5.0), perch_forms (1.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms' ); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/helmstar/public_html/perch
PERCH_CORE: /home/helmstar/public_html/perch/core
PERCH_RESFILEPATH: /home/helmstar/public_html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 50M, Max POST 50M, Memory: 64M, Total max file upload: 50M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /home/helmstar/public_html
HTTP_HOST: www.helmstargroup.com
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you try adding html="true" to the tag?

At first that didn't help, but on resave, it's working. THanks!