Open henrykuijpers opened 1 year ago
This issue goes even further:
There are 3 cases where this can be an issue:
Case 1: SlingPostProcessor
SlingPostProcessor
implementation that runs for more than 5ms (i.e. with a simple sleep of 5ms, but, of course, this should be related to the processing that you need to do that can take a variable amount of time)jcr:created
-property will be put before the postprocessor, the jcr:lastModified
will be put after the postprocessor has finishedCase 2: Drag&drop of asset on component
jcr:lastModified
-property will have a diff much bigger than 5msCase 3: Existing component gets a new field with a default value
There is a "fake" defaults thing going on: When saving a "fresh" dialog, actually, the field's default values will be saved into the repository, making it seem like the default values are applied.
This whole thing is a serious flaw in the AEM product and should be fixed.
Hi @gabrielwalt , @vladbailescu , @bpauli , @raducotescu , @richardhand , @jckautzmann ,
Sorry to tag you guys, but requesting your attention to this issue, as this is a serious flaw in how TouchUI (and ClassicUI) are working at this moment. Also, this is not an issue that can be fixed with the Core Components, it requires a fix in the AEM product.
If we are wrong, considering the explanation provided, we'd love to hear this too. :)
Bug Report
Current Behavior
Expected behavior/code The default values for the dialog fields should be considered at all times: Those values are there for a reason of course.
Environment
Possible Solution Remove the "freshness" feature (or at least remove the 5msec "rule").
Additional context / Screenshots The problem appears to be in the "freshness"-feature of the TouchUI: The default mode is "CHECK_FRESHNESS", which does the following: It calculates the difference between the jcr:created value vs the jcr:lastModified value. If that difference is 5msec or less, then the values are considered "fresh" and the default values will be filled in. Otherwise, the default values will not be used and all fields will not show a default value (and thus show "no value", which of course is wrong).
It appears that a workaround is already in place in
/libs/cq/gui/components/authoring/dialog/dialog.jsp
for the "forms" feature:It also appears that it's impossible to change this behavior, the only component where this behavior can be changed is the "select" coral component, all the other components don't have that "forceIgnoreFreshness"-property that the "select"-component supports.