Forum

Thread tagged as: Problem

Multiple instances of ckeditor not loading

Choosing a subject line for this was tricky as I'm not 100% sure how to explain what's happening so I wish I could attached a screenshot. Basically, I have multiple instances of ckeditor in most of my content blocks and in all cases only the first editor loads correctly, all subsequent instances do not display the editor entirely. Only the first has the full set of editing tools above the text input field all others don't display any at all, just a box to write text in but no way to edit it. I've made sure that they all have different id's. The code is below.

If you can see the problem that I cannot please let me know, I've tried quite a few things to now avail.

<div class="<perch:content id="title-bgcolour" type="select" label="Page title background colour" options="Dark Blue|row-darkblue, Mid Blue|row-midblue, Light Blue|row-lightblue, White|row-white" allowempty="false" required="true" order="1" />">
    <div class="container content-title">
    <div class="row">
        <div class="col-12">
            <h1><perch:content id="title" type="text" label="Page title" title="true" size="l" order="2" /></h1>
        </div>
    </div>
    </div>
</div>
<div class="<perch:content id="info-bgcolour" type="select" label="Info background colour" options="Dark Blue|row-darkblue, Mid Blue|row-midblue, Light Blue|row-lightblue, White|row-white" allowempty="false" required="true" order="3" />">
    <div class="container content-block">
    <div class="row">
        <div class="col-sm-12 col-md-8">
            <perch:content id="text" type="textarea" label="Content text" html="true" editor="ckeditor" />
            <perch:if exists="accordion">
                <perch:repeater id="accordion" label="Accordion">
                    <div class="accordion-item">
                        <p class="accordion-title">
                          <a class="btn btn-primary" data-toggle="collapse" href="#<perch:content id="slug" type="slug" for="accordiontitle" />" aria-expanded="false" aria-controls="<perch:content id="slug" type="slug" for="accordiontitle" />"><perch:content id="accordiontitle" type="text" label="Accordion title" required="true" /></a>
                        </p>
                        <div class="collapse" id="<perch:content id="slug" type="slug" for="accordiontitle" />">
                          <div class="card card-body">
                            <perch:content id="accordioncontent" type="textarea" label="Accordion content" html="true" editor="ckeditor" />
                          </div>
                        </div>
                    </div>
                </perch:repeater>
            </perch:if>
        </div>

        <div class="col-sm-12 col-md-4">
            <perch:content id="location" type="textarea" label="Address" html="true" editor="ckeditor" />
            <div>
            </div>
            <perch:content id="findingus" type="textarea" label="Transport information" html="true" editor="ckeditor" />
        </div>

    </div>
    </div>
</div>
Emily Taylor

Emily Taylor 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I wish I could attached a screenshot

You can add a link to an image.

Can you post your diagnostics report?

Link to the screenshot: https://www.dropbox.com/s/eumk2a3zt1q3iee/Screen%20Shot%202017-12-20%20at%2009.44.57.png?dl=0

Diagnostics below:

Perch: 3.0.12
Production mode: Production (100)
Installed apps: content (3.0.12), assets (3.0.12), categories (3.0.12), perch_blog (5.6.1), perch_forms (1.10)
DB driver: PDO
DB tables: perch3_categories (0), perch3_category_counts (0), perch3_category_sets (0), perch3_content_index (104), perch3_content_items (53), perch3_content_regions (13), perch3_menu_items (10), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (3), perch3_pages (12), perch3_resource_log (122), perch3_resource_tags (0), perch3_resources (33), perch3_resources_to_tags (0), perch3_settings (29), perch3_user_passwords (0), perch3_user_privileges (28), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1)
Users: 1
App runtimes:
<?php
    $apps_list = [ 
        'perch_blog',
        'perch_forms'
    ];
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins), publish_posts (1 mins), process_webmentions (1 mins)
Editor plug-ins: ckeditor
H1: f6d9a2580a6577dd338edb6e49bf9ac9
L1: fcb626bc407c06799c4d368546a9b674
F1: 3b606135b33e6a102526838f4152a807
headerColour: #378BCA
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
installedAt: 3.0.12
update_3.0.12: done
latest_version:
on_sale_version:
headerScheme: dark
dashboard: 1
keyboardShortcuts: 1
sidebar_back_link: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 1
content_frontend_edit: 1
content_skip_region_list: 0
assets_restrict_buckets: 0
logoPath: /admin/resources/bedminstermedicallogocms.png
perch_blog_site_name:
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 1
perch_blog_comment_notify: 0
perch_blog_webmention_tx: 0
perch_blog_webmention_rx: 0
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: kubiakte_gaywood
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: kubiakte_gaywood
PERCH_DB_PREFIX: perch3_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: hello@kubiakcreative.com
PERCH_EMAIL_FROM_NAME: Kubiak Creative
PERCH_LOGINPATH: /admin
PERCH_PATH: /home/kubiaktest/public_html/gaywood/admin
PERCH_CORE: /home/kubiaktest/public_html/gaywood/admin/core
PERCH_RESFILEPATH: /home/kubiaktest/public_html/gaywood/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_GMAPS_API_KEY: AIzaSyBdEC31nGyWGD6ILZj5l1FQr4Vv3JYEu0M
PERCH_RWD: 1
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_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: f704e7442d11292c99b5
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/kubiaktest/public_html/gaywood/admin/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_ENABLE_EXIF: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings

PHP: 7.0.25
Zend: 3.0.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.51-38.2
MySQL server: 5.5.51-38.2
Free disk space: 255.93 GB
Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, gmp, SPL, iconv, session, intl, json, mbstring, mcrypt, mysqli, odbc, standard, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, Reflection, imap, SimpleXML, soap, sockets, exif, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, SourceGuardian, ionCube Loader
GD: Yes
ImageMagick: No
PHP max upload size: 64M
PHP max form post size: 64M
PHP memory limit: 256M
Total max uploadable file size: 64M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
DOCUMENT_ROOT: /home/kubiaktest/public_html/gaywood
GATEWAY_INTERFACE: CGI/1.1
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-gb
HTTP_CONNECTION: close
HTTP_COOKIE: PHPSESSID=335l737em191070l1moaaevil1; cmsa=1
HTTP_HOST: gaywood.kubiaktest.com
HTTP_REFERER: https://gaywood.kubiaktest.com/admin/core/settings/diagnostics/add-ons/
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0.2 Safari/604.4.7
HTTP_X_HTTP_PROTO: HTTP/1.1
HTTP_X_LOG_8085: 82.69.82.79
HTTP_X_REAL_IP: 82.69.82.79
PATH: /bin:/usr/bin
PHPRC: /opt/php70/lib
QUERY_STRING: extended
REDIRECT_STATUS: 200
REMOTE_ADDR: 82.69.82.79
REMOTE_PORT: 47310
REQUEST_METHOD: GET
REQUEST_URI: /admin/core/settings/diagnostics/?extended
SCRIPT_FILENAME: /home/kubiaktest/public_html/gaywood/admin/core/settings/diagnostics/index.php
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
SERVER_ADDR: 192.185.94.206
SERVER_ADMIN: webmaster@gaywood.kubiaktest.com
SERVER_NAME: gaywood.kubiaktest.com
SERVER_PORT: 80
SERVER_PROTOCOL: HTTP/1.1
SERVER_SIGNATURE: <address>Apache Server at gaywood.kubiaktest.com Port 80</address>
SERVER_SOFTWARE: Apache
UNIQUE_ID: WjpXyMC5ArcACgn2c@sAAAIO
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1513773000.773
REQUEST_TIME: 1513773000
argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the editor load if you focus the fields?

As soon as I add one of the repeaters the editors load. Is that the same thing? I'm not sure what you mean by focus the fields?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I mean click into the field so you can start typing.

Do you get any errors in your browser console?

No clicking inside the field does nothing. I've got no errors in the console either.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is the CKEditor plugin recently downloaded?

Yes, I downloaded it yesterday.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. It's not something we've heard other people reporting since this was last fixed, but we'll see if we can reproduce it.

Great thanks! Let me know what you find out.

Any luck? I probably won't be dealing with this until the new year after today but can come back to the forum and see if you've got any ideas then.

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, I've not had a chance to look at it yet.

Hi Drew, just wondering if you had a chance to look at this yet?

Andy, if you enter something in the CKEditor textarea field and enter the record, does the editor then appear?

Hi Montgomery. No it doesn't.

It appears to be something to do with my accordion repeater. When I add an accordion item the text editors appear and when I remove the whole "<perch:if exists="accordion">" section of the code the text editors appear without an issue.

I've realised I don't need the <perch:if> tags around the repeater but that hasn't made a difference.

If I remove the below line from the template code the other text editors work fine but I cannot understand why that would be.

<perch:content id="accordioncontent" type="textarea" label="Accordion content" html="true" editor="ckeditor" />

Whole template code:

<div class="<perch:content id="title-bgcolour" type="select" label="Page title background colour" options="Dark Blue|row-darkblue, Mid Blue|row-midblue, Light Blue|row-lightblue, White|row-white" allowempty="false" required="true" order="1" />">
    <div class="container content-title">
    <div class="row">
        <div class="col-12">
            <h1><perch:content id="title" type="text" label="Page title" title="true" size="l" order="2" /></h1>
        </div>
    </div>
    </div>
</div>
<div class="<perch:content id="info-bgcolour" type="select" label="Info background colour" options="Dark Blue|row-darkblue, Mid Blue|row-midblue, Light Blue|row-lightblue, White|row-white" allowempty="false" required="true" order="3" />">
    <div class="container content-block">
    <div class="row">

        <div class="col-sm-12 col-md-8">

            <perch:content id="text" type="textarea" label="Content text" html="true" editor="ckeditor" />

            <perch:repeater id="accordion" label="Accordion">
                <div class="accordion-item">
                    <p class="accordion-title">
                        <a class="btn btn-primary" data-toggle="collapse" href="#<perch:content id="slug" type="slug" for="accordiontitle" />" aria-expanded="false" aria-controls="<perch:content id="slug" type="slug" for="accordiontitle" />">
                            <perch:content id="accordiontitle" type="text" label="Accordion title" required="true" />
                        </a>
                    </p>
                    <div class="collapse" id="<perch:content id="slug" type="slug" for="accordiontitle" />">
                      <div class="card card-body">
                        <perch:content id="accordioncontent" type="textarea" label="Accordion content" html="true" editor="ckeditor" />
                      </div>
                    </div>
                </div>
            </perch:repeater>

        </div>

        <div class="col-sm-12 col-md-4">
            <perch:content id="location" type="textarea" label="Address" html="true" editor="ckeditor" />
            <div>
                <perch:content id="map" type="map" label="Address" zoom="15" />
            </div>
            <perch:content id="transport" type="textarea" label="Transport information" html="true" editor="ckeditor" />
        </div>

    </div>
    </div>
</div>
Drew McLellan

Drew McLellan 2638 points
Perch Support

It's working perfectly for me here. I've just updated the CKEditor plugin to use v4.8.0 of CKEditor, so maybe download that and give it a try.

I'm about to leave for the day but I will download it and let you know if I still have an issue. Thanks Drew.