on 2021 Apr 11 11:32 PM
Hello,
if you read documentation article Narrowing Search Results, you will see following example there
<editorArea:attribute qualifier="thumbnails">
<editorArea:editor-parameter>
<editorArea:name>referenceSearchCondition_catalogVersion</editorArea:name>
<editorArea:value>{parentObject.catalogVersion}</editorArea:value>
</editorArea:editor-parameter>
</editorArea:attribute>
this works for non-localized fields (!), but lets assume the "thumbnails" is of type localized:Media, and this will lead to an error in the backoffice, when you will try to select a media from the same catalog:
ERROR [hybrisHTTP6] [DefaultPropertyValueService] error parsing expression 'parentObject.catalogVersion' on object {currentUserName=admin, parentObject=null}
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'catalogVersion' cannot be found on null
at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:213) ~[spring-expression-5.2.9.RELEASE.jar:5.2.9.RELEASE]
So, parentObject=null is NULL... How is it possible to restrict the "thumbnails" to be shown from the same catalog and make this documentation example work?
Thanks in advance!
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.