I am seeing this issue on Umbraco version: In 8.7 RC
If you open for editing, and click "Discard changes" the following console error is thrown:
angular.js?cdv=1:15635 TypeError: Cannot read property 'variants' of undefined
at mapElementValues (umbraco.services.js?cdv=1:1046)
at Object.blockObject.retrieveValuesFrom (umbraco.services.js?cdv=1:1504)
at Object.close (umbraco.directives.js?cdv=1:18252)
at Object.vm.close (umbraco.controllers.js?cdv=1:1001)
at fn (eval at compile (angular.js?cdv=1:16486), <anonymous>:4:161)
at UmbButtonController.destination.<computed> [as action] (angular.js?cdv=1:11475)
at UmbButtonController.clickButton (umbraco.directives.js?cdv=1:2164)
at fn (eval at compile (angular.js?cdv=1:16486), <anonymous>:4:245)
at callback (angular.js?cdv=1:29019)
at ChildScope.$eval (angular.js?cdv=1:19461)
<button ng-click="api.editBlock(block, block.hideContentInOverlay, index, parentForm)" >
<div class="text-block">
<h1>{{block.data.title}}</h1>
</div>
</button>
Updated content
Stale content
In future version you will be able to write ng-click="block.edit()". which should hopefully remove any misunderstandings in terms of the code to write.
We will look into this issue and whether we can replicate it.
@nielslyngsoe This kind of blocked me from building and testing backend custom views - has it been solved or is there another way to do it?
Sorry for the late reply, this has indeed been fixed immediately in this PR: https://github.com/umbraco/Umbraco-CMS/pull/8701
Thanks for reporting, I'll close this one! 馃憤
Most helpful comment
Sorry for the late reply, this has indeed been fixed immediately in this PR: https://github.com/umbraco/Umbraco-CMS/pull/8701
Thanks for reporting, I'll close this one! 馃憤