on ‎2021 Mar 10 1:24 PM
I'm trying to install SmartEdit following the documentation but I'm having some trouble. I can log in successfully and the catalogs are all displayed as expected. I get no errors from the CMS web services at this point. When I click on any option on the SmartEdit home screen eg. Staged Catalog button, I get the error from my screenshot below and there is no further action. I remain at the home screen with the error thrown.
My theory is that it's related to the UserRight assignment that is included in the impex (below). I have run this impex through system update and also manually with code execution enabled which is successfully, but doesn't seem to resolve the problem. Does anyone know how I can check for this permission? I can't seem to find how it's assigned to my admingroup?
The reason I think this is the cause is because the typescript function getPermissionResult looks for a property called permissionNames which is populated using the permission from the impex. However it doesn't work despite being uploaded.
Does anyone have any insight on how to investigate this issue any further?
INSERT_UPDATE UserRight;code[unique=true];
;smartedit.configurationcenter.read;
#% de.hybris.platform.smarteditwebservices.utils.PermissionsImportUtils.importGlobalPermission("admingroup", "smartedit.configurationcenter.read");

Pasting the error in case anyone else tries to search for it:
TypeError: e.permissions.find is not a function
at AuthorizationService.getPermissionResult (smarteditcontainer.js:1)
at AuthorizationService.mergePermissionResults (smarteditcontainer.js:1)
Request clarification before answering.
Hi everyone. Oisin and I found the solution to this problem. In the permissions requests, the payload that was being returned to Smartedit looked like this
{
"id": "global",
"permissions": {
"entry": [
{
"key": "smartedit.configurationcenter.read",
"value": "true"
}
]
}
}When what it really expects is this
{
"id": "global",
"permissions": [
{
"key": "smartedit.configurationcenter.read",
"value": "true"
}
]
}It seems that the value map was wrapped using the "entry" field because an old implementation of the `jaxbContextFactory` bean included the adapter for JAXB: `StringMapAdapter`
<alias name="customJaxbContextFactory" alias="jaxbContextFactory"/>
<bean id="customJaxbContextFactory" parent="defaultJaxbContextFactory">
<property name="typeAdapters" ref="customJaxbTypeAdaptersList" />
</bean>
<util:list id="customJaxbTypeAdaptersList">
<value>com.custom.occaddon.adapter.CustomOCCDateAdapter</value>
<value>de.hybris.platform.webservicescommons.jaxb.adapters.StringMapAdapter</value>
<value>de.hybris.platform.webservicescommons.jaxb.adapters.XSSStringAdapter</value>
</util:list>Currently this adapter is not included in the context and was not necessary, so removing it solved the problem.
Kind regards,
Ismael R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 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.