Copied to clipboard

Flag this post as spam?

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


  • Kristian Overgaard 22 posts 185 karma points notactivated
    Oct 24, 2019 @ 08:10
    Kristian Overgaard
    0

    No allowed content in Umbraco 8.2

    Hi.

    I'm trying to get the doctype grid editor working following the developer guide here: https://github.com/skttl/umbraco-doc-type-grid-editor/blob/develop/docs/developers-guide.md

    But I can't seem to get any doctypes to show up, i have the doctype option when adding content to the grid, but i keep getting the "There are no allowed document types available for creating content here. " message. enter image description here

    I tried allowing the doctypes as child notes in both the types themselves, and on the doctype containing the grid editor.

    I installed it using NuGet, and I added my doctype alias in the allowedDocTypes:

    {
    "gridEditors": [
    {
      "name": "Doc Type",
      "alias": "docType",
      "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
      "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
      "icon": "icon-item-arrangement",
      "config": {
        "allowedDocTypes": ["spotWidget"],
        "nameTemplate": "",
        "enablePreview": false,
        "viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
        "previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
        "previewCssFilePath": "",
        "previewJsFilePath": ""
      }
    }
    ],
    "javascript": [
    "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.resources.js",
    "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.services.js",
    "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js",
    "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.directives.js"
    ],
    "css": [
    "~/App_Plugins/DocTypeGridEditor/Css/doctypegrideditor.css"
    ]
    }
    

    The doctype i'm trying to add is this:

    enter image description here

    I'm using Umbraco 8.2, and i notice this says untestet here https://our.umbraco.com/packages/backoffice-extensions/doc-type-grid-editor/

    Can anyone confirm that it doesn't work on 8.2 or am i doing something wrong ?

  • Kristian Overgaard 22 posts 185 karma points notactivated
    Oct 24, 2019 @ 10:45
    Kristian Overgaard
    100

    Turns out the doctype has to be an element, then it shows correctly.

  • Chris Evans 137 posts 353 karma points c-trib
    Oct 25, 2019 @ 01:55
    Chris Evans
    0

    Yep that's right - for anyone else looking for this answer, you need to go to the Permissions tab of the document type, and select the "Is an Element type" option.

    enter image description here

  • David Quinlan 8 posts 79 karma points
    Jul 26, 2020 @ 15:43
    David Quinlan
    0

    Hi, I have a similar issue. I had 2 plugins working as expected in desired grid layouts etc. I've now added a third, and the other two have disappeared.

    I see the "there are no allowed document types..." message in content editor.

    The package manifest definitions are copy paste, and reset the name and allowedDocTypes settings

    The content blocks are setup as elements. The views exist, with the correct name in the Partials folder, bound to the correct models

    I don't see all 3 blocks available to add to the desired grid configuations. i.e. some are for full width for example, others just on 2/3 etc.

    I've refreshed and rebuilt models builder. Cleared cache etc.

    Using Ver 8.6.1

     <add key="Umbraco.ModelsBuilder.Enable" value="true" />
     <add key="Umbraco.ModelsBuilder.ModelsMode" value="LiveAppData" />
    

    Grid Editor manifest..

    {
      "gridEditors": [
    
        {
          "name": "PH Icon Block",
          "alias": "docType",
          "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
          "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
          "icon": "icon-item-arrangement",
          "config": {
            "allowedDocTypes": [ "iconTextBlock" ],
            "nameTemplate": "",
            "enablePreview": false,
            "viewPath": "/Views/Partials/",
            "previewViewPath": "/Views/Partials/",
            "previewCssFilePath": "",
            "previewJsFilePath": ""
          }
        },
        {
          "name": "PH CTA Block",
          "alias": "docType",
          "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
          "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
          "icon": "icon-link",
          "config": {
            "allowedDocTypes": [ "CTABlock" ],
            "nameTemplate": "",
            "enablePreview": false,
            "viewPath": "/Views/Partials/",
            "previewViewPath": "/Views/Partials/",
            "previewCssFilePath": "",
            "previewJsFilePath": ""
          }
        },
        {
          "name": "PH Image Block",
          "alias": "docType",
          "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
          "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
          "icon": "icon-picture",
          "config": {
            "allowedDocTypes": [ "imageBlock" ],
            "nameTemplate": "",
            "enablePreview": false,
            "viewPath": "/Views/Partials/",
            "previewViewPath": "/Views/Partials/",
            "previewCssFilePath": "",
            "previewJsFilePath": ""
          }
        }
      ],
      "javascript": [
        "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.resources.js",
        "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.services.js",
        "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js",
        "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.directives.js"
      ],
      "css": [
        "~/App_Plugins/DocTypeGridEditor/Css/doctypegrideditor.css"
      ]
    }
    

    Any ideas! I thought I had the pattern sorted and was just gearing up to build the rest of the elements, then this strangeness.

    To add to my confusion, I've changed the names in the Grid Editor Manifest, the name change is reflected for 1 item in the available editors list on the grid config, for another, it remains as before, and the third item is just not listed.

    How can I be sure that these are refreshed when I restart site after making changes to the manifest. Have tried ctrl f5 etc, the usual...

    Thanks.

    David

Please Sign in or register to post replies

Write your reply to:

Draft