cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Edit Issue (6.5) due to Language with ISO code having underscore in it Like (es_MX)

0 Kudos
1,136

Hi,

We have installed the smartedit addon on custom b2c strorefront. We are using hybris version 6.5. Language of our storefront is es_MX. We are able to login and select the site but when we try to open any page in preview mode, we are getting an error (stake trace mentioned below):

Our language is created having isocode es_MX in DB so we tried to check the code in smartedit where it could be changed to es-MX. We are able to find method convertLocalToIsoCodes in DefaultSmarteditI18nFacade and DefaultLanguageFacade where this is converted to hyphen "-" instead of underscore. Since, there is no LanguageModel exists in the system with isocode es-MX so the error message seems valid. Not sure the reason but it seems that es-MX is not converted back to es_MX before trying to fetch this from DB.

  • I wanted to check if anyone else has also faced similar issue?

  • Is there any recommendation to overcome this issue?

de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: LanguageModel with isocode 'es-MX' not found! at de.hybris.platform.servicelayer.util.ServicesUtil.validateSingleResultWithType(ServicesUtil.java:88) at de.hybris.platform.servicelayer.util.ServicesUtil.validateIfSingleResult(ServicesUtil.java:80) at de.hybris.platform.servicelayer.i18n.impl.DefaultCommonI18NService.getLanguage(DefaultCommonI18NService.java:91) at de.hybris.platform.previewwebservices.populators.PreviewTicketReversePopulator.lambda$0(PreviewTicketReversePopulator.java:100) at de.hybris.platform.webservicescommons.util.impl.DefaultLocalViewExecutor.lambda$0(DefaultLocalViewExecutor.java:49) at de.hybris.platform.webservicescommons.util.impl.DefaultLocalViewExecutor$1.execute(DefaultLocalViewExecutor.java:39) at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.executeInLocalView(DefaultSessionService.java:89) at de.hybris.platform.webservicescommons.util.impl.DefaultLocalViewExecutor.executeInLocalView(DefaultLocalViewExecutor.java:34) at de.hybris.platform.webservicescommons.util.impl.DefaultLocalViewExecutor.executeWithAllCatalogs(DefaultLocalViewExecutor.java:47) at de.hybris.platform.previewwebservices.populators.PreviewTicketReversePopulator.populate(PreviewTicketReversePopulator.java:66)

Any quick pointer would be helpful.

Thanks, Ankit

Former Member
0 Kudos

We get the same issue as you, please post any information if you manage to fix this.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

This is a known issue. There is error everytime isocode containing uppercases, like in : 'en_US', 'es_MX', etc..

PROBLEM:

https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#Locale-java.lang.String : "Construct a locale from a language code.This constructor normalizes the language valueto lowercase."

This means that locale "yy_YY" will be replaced by "yy_yy" (all lowercase). Which will raise a local data matching exception

WORKAROUND

You need to extend DefaultContextInformationLoader.

Please find here how-to:

a- https://answers.sap.com/questions/12767797/getting-server-error-on-preview-in-wcmscockpit.html b- https://jira.hybris.com/browse/ECP-1137

Former Member
0 Kudos

I am facing the same issue in 6.6. Anyone found any solution for it?

0 Kudos

Hi I am facing the same issue for hybris 6.5 Do u find any solution for this?

Former Member
0 Kudos

Hi, I have the same issue with hybris 6.6.0.0 I found the problem which is related to language iso code format. You can find the root of the problem in de.hybris.platform.cmsfacades.languages.impl.DefaultLanguageFacade#convertLocalToIsoCodes. This method is doing Locale.languageTag() https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#toLanguageTag() As the result we have en_US converted to en-US, but when you send it as the request then you get an error because this no such Language with iscoCode en-US.

former_member629599
Discoverer
0 Kudos

hi ,

we have installed Hybris 6.5.0.4 release still facing same issue.

Regards

chhunry_pheng
Explorer
0 Kudos

This issue was fixed part of the 6.5.0.4 patch release.

former_member629599
Discoverer
0 Kudos

with hybris 6.5.0.4 we are still facing same issue.

0 Kudos

Hi,

I am facing the same issue in my custom b2c storefront, and after your comment I tested this in the aparrel store uk (included in out of the box b2c_acc_plus receipe) v6.5.0.4 by changing the default and supported language of the corresponding basestore to es_CO and the issue still seems to be present. Can you please provide some suggestions, in case I am doing something wrong?