Search code examples
content-management-systemsap-commerce-cloudbackoffice

hybris smart edit errors


We have migrated our project from 6.6 to 1811. When I go to smartedit and select Basic edit perspective I am getting below errors. Could anyone let me know what I am doing wrong here. Thank you for your valuable time and suggestions.

de.hybris.platform.cms2.exceptions.CMSItemNotFoundException: Content slot not found for name "HeaderContactUsLinks"

de.hybris.platform.cms2.exceptions.CMSItemNotFoundException: Content slot not found for name "HeaderImage"

enter image description here


Solution

  • I assume that the jsp associated to this page's template tries to display the HeaderContactUsLinks slot by doing the following(or something similar):

    <cms:pageSlot position="HeaderContactUsLinks" var="feature" element="div">
      <cms:component component="${feature}" element="div"/>
    </cms:pageSlot>
    

    However, according to the Exception, there is no Content Slot Configured for that position and that is why Smart Edit complains. In order to configure a content slot for that position(i.e HeaderContactUsLinks) you can adjust and import the following impex:

    INSERT_UPDATE ContentSlotName; name[unique = true]    ; template(uid, $contentCV)[unique = true][default = 'YourPageTemplateIdGoesInHere']; validComponentTypes(code); compTypeGroup(code)
    ; HeaderContactUsLinks              ;                                                                           ;                          ; wide
    
    INSERT_UPDATE ContentSlot; $contentCV[unique = true]; uid[unique = true]         ; name                                  ; active; cmsComponents(&componentRef); ; ;
                             ;                          ; HeaderContactUsLinks-Slot ; Header Contact Us Links Slot; true  ;    ; ; ;
    
    INSERT_UPDATE ContentSlotForTemplate;$contentCV[unique=true];uid[unique=true];position[unique=true];pageTemplate(uid,$contentCV)[unique=true][default='YourPageTemplateIdGoesInHere'];contentSlot(uid,$contentCV)[unique=true];allowOverwrite
                                        ;;HeaderContactUsLinks-SlotForTemplate;HeaderContactUsLinks;;HeaderContactUsLinks-Slot;true