I upgraded from 7.12.4 to 7.13.1. In 7.13.1 using the an existing color picker, the value for the color is updated on save and publish but the label is not updated.
I've uploaded a screencast to show the issue: https://screencast-o-matic.com/watch/cqV3Y13ZYH In the example I am just printing the property value in the view to show what is there. The value is updating as expected but the label does not (it appears to be 1 change behind).
I would expect that the label and value update simultaneously instead of only the value itself.
Another thing i've noticed is a lack of $dirty check on change. There's no unsaved changes prompt.
I checked this in a nested content. Might be ok outside of one.
PR in #4222
@bkclerke It looks like @kjac 's changes will fix this, but to be extra sure, could you let me know what code you're using on the frontend in your view? And I'd like to see what you updated to output "before backwards", "after backwards", "final backwards" too please so I can make sure our testing is the same.
Hey @nul800sebastiaan I edited the /umbraco/js/umbraco.controller.js file to place a console log on lines 11654, 11662 and 11669. It looks like this when I was testing:
console.log('before backwards',$scope.model.value)
// Backwards compatibility, the color used to be stored as a hex value only
if (typeof $scope.model.value === 'string') {
$scope.model.value = {
value: $scope.model.value,
label: $scope.model.value
};
}
console.log('after backwards',$scope.model.value)
// Complex color (value and label)?
if (!$scope.model.value.hasOwnProperty('value'))
return;
var modelColor = $scope.model.value.value;
var modelLabel = $scope.model.value.label;
console.log('final backwards',$scope.model.value)
// Check for a full match or partial match.
Thanks @bkclerke that was helpful! The PR does what it needs then, I'll merge. 7.13.2 is due out next Wednesday but I'll post the updated umbraco.controller.js file here so you won't have to wait.
Here we go @bkclerke - this fixes specifically only this issue. Make sure to bump your ClientDependency.config as well for the changes to go into effect. Note that the previous label is still stored the first time, once you change the selection now the new and correct label will be stord.
Thank you so much @nul800sebastiaan & @kjac !!!! You guys are AWESOME!
Thank you so mucj @kjac and @nul800sebastiaan . I hade the same error and the ZIP worked for me. :)
I still have this issue on v7.15.3 after upgrade from 7.12.3 - was this fix ever merged?
EDIT: Never mind. Sorry. =D I works =D
Most helpful comment
Here we go @bkclerke - this fixes specifically only this issue. Make sure to bump your ClientDependency.config as well for the changes to go into effect. Note that the previous label is still stored the first time, once you change the selection now the new and correct label will be stord.
Fix4200.zip