Forum

Thread tagged as: Problem, Error, Blog

Markitup editor not working on blog

Hi there,

I've noticed that the markitup toolbar isn't showing up in admin part of my blog posts. What's weird is that it works fine in other templates of my site that aren't related to the blog app.

So for example, in post.html

<perch:block type="text" label="Text">
   <div class="container">
       <h3><perch:blog id="heading" type="text" label="Sub Heading" required="true" title="true" /></h3>
       <perch:blog id="content" type="textarea" label="Text" editor="markitup" />
   </div>
</perch:block>

The editor toolbar doesn't show up but if i use the exact same block in another template (not the blog) and switch out the perch:blog for perch:content then the tool bar shows up fine.

Just wondering if there is a bug or if there is something wrong with my blog core files?

Any help would be greatly appreciated.

Cameron Duthie

Cameron Duthie 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Could you post your diagnostics report please?

Diagnostics report
PERCH INFORMATION

Perch: 2.8.4
Production mode: Production (100)
Installed apps: content (2.8.4), assets (2.8.4), categories (2.8.4), perch_blog (4.6)
DB driver: PDO
DB tables: perch2_blog_authors, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 2
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog'
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: e3dee3b85c73659bb88afbfc14a261bf
L1: a93e559b299277c5ac26c38a07b8fb45
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.4: done
latest_version: 2.8
on_sale_version: 2.8.4
perch_blog_update: 5.0
perch_blog_post_url: /blog/post.php?s={postSlug}
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: biog
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: akrugo_perch
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: cameron@madewithfabric.com
PERCH_EMAIL_FROM_NAME: Cameron Duthie
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/vhosts/akrugo.com/Development/perch
PERCH_CORE: /var/www/vhosts/akrugo.com/Development/perch/core
PERCH_RESFILEPATH: /var/www/vhosts/akrugo.com/Development/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/vhosts/akrugo.com/Development/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.3.5
Zend: 2.3.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.1.54
MySQL server: 5.1.54
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, sockets, exif, tokenizer, xml, cgi-fcgi, curl, dom, fileinfo, gd, imap, json, ldap, mbstring, mcrypt, mysql, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_sqlite, Phar, snmp, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, ionCube Loader
GD: Yes
ImageMagick: No
PHP max upload size: 128M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /sbin:/usr/sbin:/bin:/usr/bin
PP_CUSTOM_PHP_INI: /var/www/vhosts/dev.akrugo.com/etc/php.ini
FCGI_ROLE: RESPONDER
HTTP_HOST: dev.akrugo.com
HTTP_X_REAL_IP: 94.0.143.34
HTTP_X_FORWARDED_FOR: 94.0.143.34
HTTP_X_ACCEL_INTERNAL: /internal-nginx-static-location
HTTP_CONNECTION: close
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2351.3 Safari/537.36
HTTP_REFERER: https://dev.akrugo.com/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: ROUTEID=.sp-app-5; MYCLOUDID=.sp-app-5; cmsa=1; PHPSESSID=bodlq002nv9uqk7fsjjsv6imr6; cmssb=0
SERVER_SIGNATURE: <address>Apache Server at dev.akrugo.com Port 80</address>
SERVER_SOFTWARE: Apache
SERVER_NAME: dev.akrugo.com
SERVER_ADDR: 216.70.111.124
SERVER_PORT: 80
REMOTE_ADDR: 94.0.143.34
DOCUMENT_ROOT: /var/www/vhosts/akrugo.com/Development
SERVER_ADMIN: jane@collvey.com
SCRIPT_FILENAME: /var/www/vhosts/akrugo.com/Development/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 36224
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.0
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME: 1428437843

Wow that was fast, you responded quicker than i could finish editing my post. Thanks, Drew! :D

Drew McLellan

Drew McLellan 2638 points
Perch Support

Was this a fresh install of 2.8.4 or an update? If an update, did you also update markitup at the same time?

Thanks for getting back to me, Drew.

It was a fresh install of the blog app from a few weeks ago.

It's strange how it only happens on the blog, could it be the core files related to the app?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Was Perch itself an update - not the Blog App? If so did you also update the MarkItUp Editor in Perch Core?

Hi Rachel,

No everything was a fresh instal - it's a new site development.

I haven't had to update anything as of yet.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show us your post.html template?

Sure thing,

<!--* Feilds added to every post. *-->
<h2><perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" /></h2>
<img src="<perch:blog id="image" type="image" width="810" height="327" crop="true" label="Cover Image" order="2" help="image needs to be 1600px x 315px" />" alt="<perch:content id="alt" type="text" label="Alt text" />" />
</div>
<div class="meta">
    <span class="author"><i></i><perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></span>
    <span class="date"><i></i><perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y"/></span>
    <span class="twitter">
        <a href="https://twitter.com/share" class="twitter-share-button" data-via="akrugo" data-hashtags="akrugo">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^https:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
    </span>
    <span class="linkedIn">
        <script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
        <script type="IN/Share" data-counter="right"></script>
    </span>
</div><!-- end meta -->

<div class="container intro">
    <h2><perch:blog id="subTitle" type="text" label="subTitle" required="false" size="xl autowidth" order="3" /></h2>
</div>


<!--* Perch blocks start here. *-->
<perch:blocks>

   <!--* inline images. *-->
    <perch:block type="fullwidthimage" label="Full width image">
        <div class="fullwidth">
            <img src="<perch:blog id="fullimage" type="image" width="1600" label="Image" />" alt="<perch:blog id="alt" type="text" label="Image description" />" />
        </div>         
    </perch:block>

    <!--* Images on the left, text on the right *-->
     <perch:block type="imageandtext" label="Image and text">
        <div class="container">
            <div class="one-half column">
                <img src="<perch:blog id="contentimage1" type="image" width="800" label="Image" />" alt="<perch:blog id="alt1" type="text" label="Image description" />" />
            </div>

            <div class="one-half column">
                <perch:blog id="content2" type="textarea" label="Text" markdown="true" editor="markitup" />
            </div>
        </div>    
    </perch:block> 

    <!--* Just text. *-->
     <perch:block type="text" label="Text">
        <div class="container">
            <perch:blog id="content" type="textarea" label="Text" markdown="true" editor="markitup" />
        </div>    
    </perch:block>

</perch:blocks>


<perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes">

</perch:categories>

<perch:blog id="excerpt" type="textarea" label="Excerpt" help="Max word count 50" words="54" textile="true" order="2" suppress="true" size="s" />
<!--* A line to create a smaller version of the cover image for the listing page. *-->
<perch:blog id="image" type="image" width="640" height="240" crop="true" suppress="true" />

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, I see it too. I don't have a fix for you but I do have a workaround. Add editor="markitup" to your excerpt field, too.

Worked like a charm, Drew. Much appreciated! :)

Is that something i'll need to keep in mind for the future or is this a bug that will be addressed in future updates?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's a bug, but still worth keeping in mind until I have a fix.

Awesome! Will do.

Thanks for all your help!