When you want to clear the property of an inherited field and keep inheriting all the rest, we are unable to do so unless via crx - the editor seems to turn this into null causing the inheritance to be restored instead of saving it as empty string
By example - we go from:
Step 1: inherited configuration we want to clear a property for
Step 2: clearing the property while keeping the rest in place
Step 3: revisiting the configuration - we see it restored the inheritance
This is a fairly common use case for 'global site settings' for example where we want to remove some specific settings for a subsite or a specific page hierarchy
this can be easily reproduced with our sample content e.g.
it's not possible to set "string param" to an empty value - it then set to inherited back again.
the same effect occurs if "string param" is set to a string with 1 space (" ").
maybe it would be possible to distinguish between null (=inherit) and empty string ("" or any number of blanks)?
- I have pushed a change to the feature/WCON-66_clear-inherited branch.
This allows empty strings values and empty arrays to be posted (these were previously "converted" to null), allowing for the "clearing" of inherited properties.
Is this the desired behaviour?
TODO - this method will not work for Integer/Long/Double values, as the backend will reject an empty string for properties of this type.
If/when this back-end "accepts" empty strings as "clearing" values, lines 145-147 could be deleted.
yes, this solution looks good to me.
in case of other data types:
there is no equivalent for an empty strings for numbers or the other data types
so in this case the backend accepts only null or a real value
in this case the previous behavior should be applied - either overriding with a new value entered, or it inherits
thanks, it's merged