Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Git Pull Request
Fix versions
Affects versions
Priority
Low
Details
Details
Git Pull Request
Fix versions
Affects versions
Priority
Zendesk Support
Zendesk Support
Zendesk Support
Created June 10, 2020 at 11:56 PM
Updated July 30, 2020 at 8:54 AM
Resolved July 1, 2020 at 6:11 AM
Error reported in the last step of this blog: https://liferay.dev/blogs/-/blogs/integracion-liferay-commerce-con-etl-tratamiento-de-datos-y-carga-de-productos-parte-4
It is possible to reproduce the error if:
"send a product through the API "/o/headless-commerce-admin-catalog/v1.0/products/" with different language from the default site and within the attachment "titleMap" array, and the default language does not exist from the website."
The error occurs when trying to add the translation into the list by defeault the portal instance for the image title (CPAttachmentFileEntryLocalServiceImpl.java:136). The reason is because it tries to add the default language to an object that was used "LanguageUtils.getLocalizedMap" that returns a "Collections.unmodifiableMap".
Log Error:
java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableMap.put(Collections.java:1457) at com.liferay.commerce.product.service.impl.CPAttachmentFileEntryLocalServiceImpl.addCPAttachmentFileEntry(CPAttachmentFileEntryLocalServiceImpl.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)