Forum

Thread tagged as: Problem, CKEditor, Field-Types

CKEditor fields within blocks not displaying editor until saved

I've built a new site in Perch 3 with the latest CKEditor add-on. I've a region with a selection of blocks that all make use of CKEditor. If, when editing the content, I add a new block the text area that should have the CKEditor is just an empty text area when the block is first displayed. When I save the page it then displays the editor. I compared this to the now included Redactor plug-in which works perfectly (editor appears when a new block is created). Unfortunately, I need to customise the editor down to the bare minimum (no images or file uploads and specific formatting) so have stuck with CKEditor as I'm more familiar with it. Not sure if this is my error or a bug.

An example block template –

<perch:block type="block_1_col_text" label="One-column text">
    <section class="block_1_column">
        <h2><perch:content id="title" label="Title" type="text" required="true" /></h2>
         <perch:content id="content" type="textarea" label="Content" html="true" editor="ckeditor" />
    </section>
</perch:block>

Diagnostic –

Perch: 3.0, PHP: 7.0.17, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (3.0), assets (3.0), categories (3.0), perch_blog (5.5), perch_forms (1.9)
App runtimes: <?php $apps_list = array( 'perch_blog', 'perch_forms', );
PERCH_LOGINPATH: /manage
PERCH_PATH: /var/www/vhosts/gen2.co.uk/httpdocs/manage
PERCH_CORE: /var/www/vhosts/gen2.co.uk/httpdocs/manage/core
PERCH_RESFILEPATH: /var/www/vhosts/gen2.co.uk/httpdocs/manage/resources
Image manipulation: GD Imagick
PHP limits: Max upload 10M, Max POST 16M, Memory: 128M, Total max file upload: 10M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
SCRIPT_NAME: /manage/core/settings/diagnostics/index.php
REQUEST_URI: /manage/core/settings/diagnostics/
DOCUMENT_ROOT: /var/www/vhosts/gen2.co.uk/httpdocs
HTTP_HOST: www.gen2.co.uk
Gary Hughes

Gary Hughes 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does this still happen with the current version of Perch?

Hi Drew, I've just updated to 3.0.1 and it's still happening. No js errors in the console. I also tried a fresh install of the CKEditor app to rule out any changes I made to the config but no change. Is there anything else I can provide that might be helpful?

Drew McLellan

Drew McLellan 2638 points
Perch Support

We'll give it a go and see what we can come up with.

@drew.. I think i posted a similar if not the same issue here. but have a console stack trace:

https://forum.grabaperch.com/forum/04-05-2017-ckeditor-is-blank-after-p3-update?page=1#reply-48138

Hi Drew,

Any news on this? its really quite annoying to continually have to save the region just so the ckeditors appear. Especially if you have a large blocks section and you need to re-scroll to the same location again on the page.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

@Jordin Brown: I'm not convinced your replies to other people's threads will have been noted. If you have an issue then you need to raise your own thread with your own details not hop onto another thread. We can't help more than one person at a time without everyone getting confused.