Thread tagged as: Question, Problem, CKEditor

Bug with repeater region or config issue

I'm not sure if this is a 'bug' or just a config issue on my part. Thought it might be worth mentioning.

I have the following repeater template:

 <perch:repeater id="accordion-details" label="Accordion">
        <div class="accordion">
            <h3 class="accordion-collapsable">
                <perch:content id="accordion-title" type="text" label="Accordion title" required="true" help="e.g What is CACI Body toning?" /><span>+</span>
            <div class="accordion-body">
                <perch:content id="treatment-description" type="textarea" label="Text" html="true" editor="ckeditor" imagewidth="640" imageheight="480" />

After adding one item in the region admin, you then can't seem to click into the next text area/ckeditor box. Clicking anything inside the 2nd ckedior box actually interacts with the previous one. e.g if you click source, it opens up the source of the one above. A save seems to sort things out (you can then click into all of them) but Im assuming its some kind of duplicate ID issue...should I be using some kind of unique id for repeating content types or is this a bug?

Just a quick confirmation that I'm using Perch: 2.8.2

Jonathan Clift

Jonathan Clift 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does this only happen with CKEditor?

You also should not use dashes in your IDs.

Yes, appears to only be related to CKEditor. I have another repeater with just text inputs and I don't seem to experience the same issue.

Regarding IDs, does Perch sometimes have issues with hyphens then? I would normally use a hyphen format for all my HTML ids/classes.

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can use anything you wish in your HTML IDs, but Perch IDs have different requirements to HTML.

I see, thanks for pointing that out.

I'd like to point out that the initial problem with CKeditor was not solved - I too am having this issue. Probably due to a repeated perch content ID I expect, but there is no way I can find of making the Perch IDs unique in each repeater (I tried adding <perch:content id="perch_item_index" /> like you would a normal HTML ID, but it doesn't work in the same way).

Any further help would be great.

This issue is still present in the latest version of Perch. Any updates on a fix?

Same problem for me with CKeditor in a repeater. Any news about it?