cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to customise CMSSite editor-area in backoffice admin area

nicko_cadell
Explorer
0 Kudos

In hybris 5.7 I'm trying to customise the backoffice admin area (hmc2) editor configuration for the CMSSite item. In my backoffice-config.xml file I have the following:

 <context merge-by="module" parent="auto" type="CMSSite" component="editor-area">
     <editorArea:editorArea name="editorArea">
         <editorArea:tab name="hmc.tab.common">
             <editorArea:section name="hmc.properties">
                 <editorArea:custom>
                     <editorArea:default>THIS IS A TEST. IT HAS SUCCEEDED.</editorArea:default>
                 </editorArea:custom>
             </editorArea:section>
         </editorArea:tab>
     </editorArea:editorArea>
 </context>

However when I view a CMSSite in the backoffice admin area it does not show my test content.

If I change the type attribute from CMSSite to Product or Employee and then reload the backoffice configuration those types are successfully customised to display the test content.

My extension depends on cms2 and therefor should be able to customise the configuration of the CMSSite. What have I got wrong which is preventing the customisation from applying to the CMSSite items.

Thanks, Nicko

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

We had the same problem and adding

 <requires-extension name="platformbackoffice"/>

to the extensionsinfo.xml of the custom backoffice extension fixed it.

This was because we had

 <path dir='${HYBRIS_BIN_DIR}' autoload='false' />

in our localextensions.xml.

Former Member
0 Kudos

Hi Nicko, the base configuration is the following:

     <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
         <editorArea:tab name="hmc.properties">
             <editorArea:section name="hmc.sec.urlencodingattributes">
                 <editorArea:attribute xmlns="http://www.hybris.com/cockpitng/component/editorArea" qualifier="urlEncodingAttributes"/>
             </editorArea:section>
             <editorArea:section name="hmc.sec.sitemapconfigurations">
                 <editorArea:attribute xmlns="http://www.hybris.com/cockpitng/component/editorArea" qualifier="siteMaps"/>
                 <editorArea:attribute xmlns="http://www.hybris.com/cockpitng/component/editorArea" qualifier="siteMapConfig"/>
             </editorArea:section>
         </editorArea:tab>
     </editorArea:editorArea>
 </context>
  </code>       
     <>

I guess you should use the merge-by type and specify the parent as well, alternatively if you don't want to merge the configuration you can have an ad hoc config for you editor area.

You can find the example I've mention you on acceleratorservices-backoffice-config.xml

Regards, Luca

nicko_cadell
Explorer
0 Kudos

Comment 1

Hi Luca,

I'm not sure that all of your answer made it into your comment - or the forum formatted it rather badly.

Also this site seems to limit my comments to 600 chars so this is going to take a few comments.

nicko_cadell
Explorer
0 Kudos

Comment 2

I have tried to strip my system back to basics to see what is going on. I have hybris 5.7 with the following extensions loaded: backoffice, platformbackoffice, commercesearchbackoffice, commerceservicesbackoffice, solrfacetsearchbackoffice, cmscockpit, solrserver.

I have re-initialized my DB so I have no legacy data or config. I am logging into the backoffice as admin.

In the backoffice admin area I have created a test CMSSite called 'test', the editor area looks like this:

nicko_cadell
Explorer
0 Kudos

Comment 3

I have re-initialized my DB so I have no legacy data or config. I am logging into the backoffice as admin.

In the backoffice admin area I have created a test CMSSite called 'test', the editor area looks like this:

If I open the orchestration view and look at the cockpit-config there are 3 context sections that relate to the editor-area for BaseSite or CMSSite. The sections are defined in this attachment. link text

nicko_cadell
Explorer
0 Kudos

Comment 4

So the first 2 configurations seem to be applied, the 3rd (from the cms2 module) seems to be ignored. There is no contentcatalogs section, or active section, or hmc.tab.wcms.cockpit.properties tab (assuming that is different to the hmc.properties tab). This is just standard hybris 5.7 with no custom code, should the cms2 configuration not be applied?

nicko_cadell
Explorer
0 Kudos

Comment 6

Regarding your suggestion to use merg-by type, I have tried that with no effect. Also it isn't really clear when to use merge-by type or by module. I don't really care about merging parent types or not, I just want to add a new tab to the CMSSite type.

Do you have any idea why this would be working for types like Product and not for CMSSite?

Cheers, Nicko