Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AbsolutelyN 85 posts 433 karma points
    Feb 09, 2024 @ 15:23
    AbsolutelyN
    0

    Blocks: Cannot read properties of undefined (reading 'variants')

    I've been building a new Umbraco 13 site and whilst working with blocks I keep randomly getting the error "Cannot read properties of undefined (reading 'variants')" when you hit the submit button to save the blocks.

    I've upgraded with each version of 13 and the error still persists. It is making it hard to edit and add content as you never know when it will happen - when it does all the changes you've made can't be saved.

    Its hard to tell what triggers it but it is possibly if you start editing again before the previous changes were saved. Also seems to happen if you try to click save but just miss the save button. Anyone else having this issue? I've noticed it now on three different installs.

    Chrome:

     angular.js:15697 TypeError: Cannot read properties of undefined (reading 'variants')
        at mapElementValues (umbraco.services.min.js?d=638430867950000000:1:154281)
        at blockObject.retrieveValuesFrom (umbraco.services.min.js?d=638430867950000000:1:164536)
        at Object.submit (umbraco.directives.min.js?d=638430867950000000:1:575424)
        at vm.submitAndClose (umbraco.controllers.min.js?d=638430867950000000:1:184431)
        at fn (eval at compile (angular.js:16548:15), <anonymous>:4:170)
        at d.<computed> [as action] (angular.js:11517:22)
        at UmbButtonController.clickButton (umbraco.directives.min.js?d=638430867950000000:1:47809)
        at fn (eval at compile (angular.js:16548:15), <anonymous>:4:245)
        at e (angular.js:29123:13)
        at b.$eval (angular.js:19523:16)
    

    Slightly different error in Firefox:

    TypeError: can't access property "variants", toModel is undefined
        mapElementValues umbraco.services.min.js:1
        retrieveValuesFrom umbraco.services.min.js:1
        submit umbraco.directives.min.js:1
        submitAndClose umbraco.controllers.min.js:1
        Angular 2
        clickButton umbraco.directives.min.js:1
        Angular 5
        jQuery 2
    angular.js:15697:15
    
  • Rasmus Pedersen 4 posts 74 karma points
    Mar 13, 2024 @ 09:09
    Rasmus Pedersen
    0

    Our client has also encountered this. I haven't found a way to reproduce it, sadly. We are using Umbraco 10.

    Hitting "Close" and opening the element again will allow you to "Submit", but you need to do all your changes again. So the issue seems to happen somewhere upon opening the element. enter image description here

  • AbsolutelyN 85 posts 433 karma points
    Mar 20, 2024 @ 12:26
    AbsolutelyN
    0

    I'm finding it happens frequently when you click into edit content whilst the page is still saving and/or on pages where the infinite editor is used to 2 or 3 levels deep. Still no solution or reliable way to replicate.

  • Rasmus Pedersen 4 posts 74 karma points
    27 days ago
    Rasmus Pedersen
    0

    I found a way reproduce the error. I have made an issue on Github, you can follow it here: https://github.com/umbraco/Umbraco-CMS/issues/15996

Please Sign in or register to post replies

Write your reply to:

Draft