We are using DXA for implementation of our website. There is strange behavior when XPM is applied. This is scenario
- Schema has mandatory and non-mandatory fields, lets take just text fields as examples.
- Rendering is OK in the case of mandatory field or non-mandatory field which has some text and source of the page is like
- If the field is non-mandatory and without value, output is different and looks like this
WebRequestContext.IsPreview is always true for our current development environment so that part is ok.
Model.TipText is null in that case, and maybe this is causing the issue.
Problem is related to the output because there is XPM related comment in the source of the page, so XPM does not recognize there is field without value which should be allowed for editing. Without this comment there is no placeholder "<< add text >>" when XPM is active.
So, how we can fix this issue? Why there is no XPM related comment which is necessary mark some field as editable through XPM?