Problem with accordion content template


#1

Matrix Version: 5.4.0.1

Hi

I have downloaded the new accordion content template from the templates section and I have imported it following the steps described here: https://matrix.squiz.net/resources/templates

After setting the root node on the details screen of the Accordion Content, I have applied it to the Content Container of the standard page.

The problem I am experiencing starts when I click Edit Contents to edit the standard page I am working on. The browser console throws the following error:

Uncaught ReferenceError: HTMLArea is not defined 
at ?SQ_BACKEND_PAGE=main&backend_section=am&am_section=edit_asset&assetid=233267&asset_ei_screen=contents&SQ_BACKEND_PAGE=main&sq_link_path=4871%2C389161%2C415914%2C416648&sq_asset_path=3424%2C217226%2C232772%2C233266:638

If I try to acquire the locks the console throws another error and I am not allowed to edit anything, the spinner never stops:

Uncaught ReferenceError: editor_container_233268_metadata_field_wysiwyg_233231 is not defined
    at eval (eval at saveState (VM2146 state.js:109), <anonymous>:1:1)
    at saveState (VM2146 state.js:109)
    at makeChanges (VM2146 state.js:137)
    at form_on_submit (?SQ_BACKEND_PAGE=main&backend_section=am&am_section=edit_asset&assetid=233267&asset_ei_screen=contents&SQ_BACKEND_PAGE=main&sq_link_path=4871%2C389161%2C415914%2C416648&sq_asset_path=3424%2C217226%2C232772%2C233266:157)
    at HTMLFormElement.onsubmit (?SQ_BACKEND_PAGE=main&backend_section=am&am_section=edit_asset&assetid=233267&asset_ei_screen=contents&SQ_BACKEND_PAGE=main&sq_link_path=4871%2C389161%2C415914%2C416648&sq_asset_path=3424%2C217226%2C232772%2C233266:180)
    at submit_form (VM2135 html_form.js:40)
    at HTMLInputElement.onclick (?SQ_BACKEND_PAGE=main&backend_section=am&am_section=edit_asset&assetid=233267&asset_ei_screen=contents&SQ_BACKEND_PAGE=main&sq_link_path=4871%2C389161%2C415914%2C416648&sq_asset_path=3424%2C217226%2C232772%2C233266:278)

Please see screenshot attached:

Can anyone help please?

Many thanks,
Yolanda


(Bart Banda) #2

Hi Yolanda, I think it’s due to you using the classic WYSIWYG editor. That template was only designed to work with the Edit+ editor so I think that’s why you are getting those errors.

You might have to tweak the JS in the template a bit to change where it tries to reference the WYSIWYG areas to match the markup of the classic WYSIWYG instead.


#3

Thanks Bart, I’ll do so.


(Huy Le Nguyen) #4

Hello guys,

I’m also having this exact problem, but I’m not as familiar with Squiz as others on this forum as of yet. May I have any advice on how I may solve the problem?

Cheers,
Huy


(Bart Banda) #5

Hey Huy,
Are you using the classic WYSIWYG or the Edit+ one?


(Huy Le Nguyen) #6

Hello Bart, I’m using the classic editor. Is there a way I can install the Edit+ one on the latest VM?


(Bart Banda) #7

Only if you are a Squiz client with an SLA, and depending on what you want it for I guess because Edit+ is not open source which is why we can’t distribute it as part of the VM. Might be best to have a chat to your account manager for further info/help.


(Huy Le Nguyen) #8

Hello Bart, I’ve gotten in touch with the server team, thank you for the help!


(Lidia) #9

Hi everyone

Another question regarding this template - has anyone managed to change the number of content areas to more than 5? I don’t understand why there is a limit of only 5 accordions?

Thanks,
Lidia


(Bart Banda) #10

You can have as many as you want. The default of 5 was just a sensible default we chose when we created it. You should be able to look at the various areas of the implementation to as many fields are you require.


(Huy Le Nguyen) #11

Hello Lidia, you can increase the number of accordions by creating more Metadata Fields in the Settings of the template, then in Paint Layout and Edit Layout, put in more HTML referencing those metadata fields.

A quick examination of the code in the Paint Layout Default Format and the Edit Layout contents will show you the general pattern. Then you can just copy and paste in more accordions and only have to change the keyword replacements so that they reference the correct metadata fields in the template

Hope that helps :slight_smile: