Copied to clipboard

Flag this post as spam?

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


  • Mikkel Hansen 10 posts 80 karma points
    Nov 29, 2021 @ 14:14
    Mikkel Hansen
    0

    Cannot read properties of undefined (reading 'allowedDocTypes')

    Using Umbraco 8.17.0 and Doc Type Grid Editor 1.2.7.

    When saving content using the "Save..." button, and then clicking on DTGE content in a nested Grid. The edit content layout won't open and I get this error message in the developer tools console: Cannot read properties of undefined (reading 'allowedDocTypes').

    It works just fine when using the "Save and publish..." button.

  • Bo Jacobsen 590 posts 2366 karma points
    Dec 08, 2021 @ 13:44
    Bo Jacobsen
    0

    Bumb ;-)

    We have a setup of NestedContent with a grid inside of it. So we can make multiple grid layouts.

    If the NestedContent is open and we have a DocTypeGridEditor element inside the grid and then Save the Document and after that try to click on the DocTypeGridEditor element. Then we get this error:

    TypeError: Cannot read properties of undefined (reading 'allowedDocTypes')
        at Scope.$scope.setDocType (doctypegrideditor.controllers.js?cdv=752043050:85)
        at fn (eval at compile (angular.js?cdv=752043050:16548), <anonymous>:4:150)
        at callback (angular.js?cdv=752043050:29123)
        at Scope.$eval (angular.js?cdv=752043050:19523)
        at Scope.$apply (angular.js?cdv=752043050:19622)
        at HTMLDivElement.<anonymous> (angular.js?cdv=752043050:29127)
        at HTMLDivElement.dispatch (jquery.min.js?cdv=752043050:2)
        at HTMLDivElement.v.handle (jquery.min.js?cdv=752043050:2)
    

    This is doctypegrideditor.controllers.js at line 85 inside the Our.Umbraco.DocTypeGridEditor.GridEditors.DocTypeGridEditor

    enter image description here

    Now if I fix the allowedDocTypes, then I get a new typeError TypeError: Cannot read properties of undefined (reading 'showDocTypeSelectAsGrid') on the next line. That's because the $scope.control.editor.config is null.


    If we then close the NestedContent and Save the Document, and after that try to click on the DocTypeGridEditor element. we get no errors. So it only occurs when we have the NestedContent open while saving.

  • Bo Jacobsen 590 posts 2366 karma points
    Feb 03, 2022 @ 11:00
Please Sign in or register to post replies

Write your reply to:

Draft