Hello
We are having a weird problem in several of our Neos instances where a NodeType property of the type
String saves a non-breaking space, if it is left empty in the BE.
The property definition in my NodeType yaml:
properties:
text:
type: string
defaultValue: 'Text'
ui:
inlineEditable: true
In the template I render the property like so:
{neos:contentElement.editable(property: 'text', class: 'c-grid-teaser__text', tag: 'p')}
If the field is left empty (or the default text is removed), the frontend renders this:
<p class="c-grid-teaser__text"> </p>
This makes it impossible to only render the block if it is filled with a condition like the following:
<f:if condition="{text}">
{neos:contentElement.editable(property: 'text', class: 'c-grid-teaser__text', tag: 'p')}
</f:if>
Our current workaround looks like this:
<f:if condition="{text} && {text} != ' '">
Since the same thing works in an older project with neos 3.3 this must have happened between that version and the neos 4.1 we use in the current projects.
Any help would be appreciated!