Enonic version: 7.6.1
OS: Linux
CS: 3.2.3
We have upgraded from 7.2.4 to 7.6.1. It seems like display-name-expression is not working anymore.
Here is the error we get:
main.js:2 Uncaught TypeError: Cannot read property 'getValue' of null
at main.js:2
at Function.ObjectHelper.objectPropertyIterator (main.js:2)
at PropertySet.getValuesAsString (main.js:2)
at DisplayNameResolver.getFormValues (main.js:2)
at DisplayNameResolver.safeEval (main.js:2)
at DisplayNameResolver.execute (main.js:2)
at HTMLDivElement.<anonymous> (main.js:2)
Alan
April 26, 2021, 10:21am
2
Can you provide your content type schema?
Here it is:
<?xml version="1.0" encoding="UTF-8"?>
<content-type>
<display-name>News</display-name>
<display-name-expression>${NEWS_TITLE}</display-name-expression>
<super-type>base:structured</super-type>
<form>
<input name="RELATED_LOCALE" type="ContentSelector">
<label>News page in other languages</label>
<occurrences minimum="0" maximum="1"/>
<config>
<relationshipType>system:reference</relationshipType>
<allowPath>*</allowPath>
<allowContentType>news</allowContentType>
</config>
</input>
<input type="TextArea" name="NEWS_TITLE">
<label>Title</label>
<occurrences minimum="1" maximum="1"/>
</input>
<input type="ComboBox" name="NEWS_TYPE">
<label>News Type</label>
<occurrences minimum="1" maximum="1"/>
<config>
<option value="FEATURED">Featured</option>
<option value="REGULAR">Regular</option>
<option value="MINOR">Minor</option>
</config>
</input>
<input type="ImageSelector" name="NEWS_IMAGE">
<label>Main image</label>
<occurrences minimum="1" maximum="1"/>
</input>
<input type="HTMLArea" name="NEWS_IMAGE_CAPTION">
<label>Image caption</label>
<occurrences minimum="0" maximum="1"/>
</input>
<input name="NEWS_BYLINE" type="ContentSelector">
<label>News byline content selector</label>
<occurrences minimum="0" maximum="1"/>
<config>
<relationshipType>system:reference</relationshipType>
<allowPath>*</allowPath>
<allowContentType>employee</allowContentType>
</config>
</input>
<input name="NEWS_BYLINE_STRING" type="TextLine">
<label>News byline string</label>
</input>
<input type="TextArea" name="NEWS_INGRESS_SHORT">
<label>Forsideingress</label>
<occurrences minimum="0" maximum="1"/>
</input>
<input type="TextArea" name="NEWS_INGRESS">
<label>Ingress</label>
<occurrences minimum="1" maximum="1"/>
</input>
<input name="NEWS_CONTACT" type="ContentSelector">
<label>Contact</label>
<occurrences minimum="0" maximum="0"/>
<config>
<relationshipType>system:reference</relationshipType>
<allowPath>*</allowPath>
<allowContentType>employee</allowContentType>
</config>
</input>
<input name="RELATED_PUBLICATIONS" type="ContentSelector">
<label>Related publications</label>
<occurrences minimum="0" maximum="0"/>
<config>
<relationshipType>system:reference</relationshipType>
<allowPath>*</allowPath>
<allowContentType>publication</allowContentType>
</config>
</input>
<input name="RELATED_PROJECTS" type="ContentSelector">
<label>Related projects</label>
<occurrences minimum="0" maximum="0"/>
<config>
<relationshipType>system:reference</relationshipType>
<allowPath>*</allowPath>
<allowContentType>project</allowContentType>
</config>
</input>
<input name="RELATED_NEWS" type="ContentSelector">
<label>Related news</label>
<occurrences minimum="0" maximum="0"/>
<config>
<relationshipType>system:reference</relationshipType>
<allowPath>*</allowPath>
<allowContentType>news</allowContentType>
</config>
</input>
<mixin name="tags"/>
</form>
</content-type>
Alan
April 26, 2021, 11:11am
4
Yep, it’s this one . We’ll prioritise this for the 3.2.4 release as well.