Forum

Thread tagged as: Question, Problem, Redactor

Only first textarea of multiple items has Redactor applied

I have a layout with multiple items using the template below. In Perch, only the first item has Redactor applied to the textarea when editing. Is it possible to fix this?

Template

<perch:if exists="title OR content">

  <div class="content-box content-box--<perch:content id="boxBackground" type="select" label="Box Background Colour" options="White background|white, Blue background|blue, Red background|red"
    allowempty="false" required="true" /> <perch:content id="roundCorners" type="checkbox" label="Add rounded corners?" value="content-box--round" />">

    <perch:if exists="title">
      <h2><perch:content id="title" type="text" label="Title" html="false" title="true" /></h2>
    </perch:if>

    <perch:if exists="content">
      <perch:content id="content" type="textarea" label="Content" html="true" editor="redator" imagewidth="1000" imageheight="600" />
    </perch:if>

    <perch:if exists="ctaLink AND ctaText">
      <a class="btn btn--cta" href="<perch:content id="ctaLink" type="text" label="Page Link" html="false" />">
        <perch:content id="ctaText" type="text" label="Link Text" html="false" />
      </a>
    </perch:if>

  </div>

</perch:if>

Diagnostics

Perch: 2.8.34, PHP: 5.6.25, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: took-this-out-not-sure-if-secret-key-or-what $, with PDO
Server OS: WINNT, apache2handler
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_blog (5.0), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', );
PERCH_LOGINPATH: /perch
PERCH_PATH: C:\wamp64\www\perch
PERCH_CORE: C:\wamp64\www\perch\core
PERCH_RESFILEPATH: C:\wamp64\www\perch\resources
Image manipulation: GD
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
F1: took-this-out-not-sure-if-secret-key-or-what
Resource folder writeable: Yes
HTTP_HOST: localhost
DOCUMENT_ROOT: C:/wamp64/www
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Adrian Payne

Adrian Payne 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I only see one textarea in your template. What am I missing?

Drew McLellan said: I only see one textarea in your template. What am I missing?

This template is used in a multiple items region.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That should work fine - do you get any errors in your browser console?

Oh man. Was the $.browser thing. I'd forgotten to update redactor after upgrade from a much older version. Have a nice weekend!