cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Not possible to narrow the search results for Backoffice-Reference-Selector for LOCALIZED fields

masdsalkfjh
Explorer
451

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!

Accepted Solutions (0)

Answers (0)