on ‎2018 Oct 31 1:50 PM
I want to add a new item from smart edit to my custom component but when I save the changes the item disappears. The item was created beacause I can add it from backoffice but not from smart edit. I try the same in other projects and it works successfully, maybe, because the components are OOTB and mine is customized.
I can't remove any item neither. The same thing happens,it seems like it works but when I save the changes there are no changes
There are no errors in terminal and we're using Hybris 18.08
Any suggestion?
Request clarification before answering.
Hi ,
The issue probably exists due to cmsfacades used by SmartEdit are unaware of how to convert your custom item. I would propose to debug a bit starting from de.hybris.platform.cmsfacades.cmsitems.impl.DefaultCMSItemFacade#saveItem
Probably the issue exists due to de.hybris.platform.cmsfacades.uniqueidentifier.UniqueItemIdentifierService can't convert your item from data to model and vice versa.
Please take a look at de.hybris.platform.cmsfacades.uniqueidentifier.UniqueIdentifierConverter and implement a brand new one for your custom itemtype to be used in component.
Hope this helps.
Regards, Mykola
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mykola, Thank you for your comment, we found the problem. The problem was the relation, we changed collentionType = "set" to ordered = "true" and it worked
<sourceElement type="SimpleCMSComponent" qualifier="component" cardinality="one"/>
<targetElement type="customComponent2items" qualifier="items" cardinality="many" collectionType="set"/>
</relation>
<sourceElement type="SimpleCMSComponent" qualifier="component" cardinality="one"/>
<targetElement type="customComponent2items" qualifier="items" cardinality="many" ordered="true"/>
</relation>
Regards, Andrea
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.