Copied to clipboard

Flag this post as spam?

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


  • Kieron McIntyre 116 posts 359 karma points
    Mar 12, 2019 @ 12:32
    Kieron McIntyre
    0

    Editor preview displays full page and breaks CMS interface styling

    I think this is possibly related to a few other issues reported, specifically https://our.umbraco.com/packages/backoffice-extensions/doc-type-grid-editor/doc-type-grid-editor-feedback/91647-404-on-getcontenttypeicon-and-4931dtgepreview-1 and https://our.umbraco.com/packages/backoffice-extensions/doc-type-grid-editor/doc-type-grid-editor-feedback/86919-grid-preview-in-backoffice-is-rendering-front-end-template-umbraco-763

    My project is a v7.7.7 with a v0.61 DTGE nuget install.

    When loading a page in the CMS that uses the DTGE, I can see several calls to /1131?dtgePreview=1 (one for each DTGE editor on the page), but the fields each load the full published paged rather than the correct partial. In addition to this, the styling of the CMS interface breaks preventing any further use.

    This is happening on each of the environments (local, staging and live) and I cannot find a reason why this would be happening.

    To clarify:

    • There are no redirects/rewrite rules running
    • There is no custom routing
    • I have cleared the cache, restarted the app pool and rolled the client dependency multiple times

    This started happening when I applied the fix for the Chrome 66 issue reported here.

    Can anyone suggest anything? I would rather not upgrade at this point as I'd really like to know the cause of the issue.

    Thanks people!

    Kieron

  • Matthew Wise 271 posts 1373 karma points MVP 4x c-trib
    Mar 12, 2019 @ 12:54
    Matthew Wise
    0

    Hi Kieron,

    Do you have any output caching?

    Matt

  • Kieron McIntyre 116 posts 359 karma points
    Mar 12, 2019 @ 13:46
    Kieron McIntyre
    0

    No, I'm afraid not.

  • Matthew Wise 271 posts 1373 karma points MVP 4x c-trib
    Mar 12, 2019 @ 14:11
    Matthew Wise
    0

    Where are you partials? Can you share a bit of config for one or two elements.

    Matt

  • Kieron McIntyre 116 posts 359 karma points
    Mar 12, 2019 @ 14:34
    Kieron McIntyre
    0

    Yo Matt! Sure ...

    So the partials are all in /Views/Partials/CustomGridEditors/ or /Views/Partials/Pods/

    An example of a 'failing' XHR call is http://www.example-url.co.uk/1245?dtgePreview=1 and the form paramaters being passed are:

    {
        "id": "bbdd9a36-c8ff-8616-179d-e421750eb3ce",
        "editorAlias": "announcementPod",
        "contentTypeAlias": "announcementPod",
        "value": { "name": "Announcement+Widget","announcementIcon":"umb://media/e4ecd27ef96943239083fbc7c29eec86","themeColour":"60b4fa","announcementTitle":"Policy+Value","announcementDescription":"Need+to+know+your+policy+value?","announcementLink":[{"id":"1372","name":"Contact+us","udi":"umb://document/5dd2b0e439a0444ab8cbe75743b58137","url":"/contact-us/","icon":"icon-phone+color-green","published":true}]},
        "viewPath": ,
        "previewViewPath": "/Views/Partials/Pods"
    }
    

    The config, I believe is correct given that the previewViewPath is being correctly passed as a parameter.

    Having said that, at /App_Plugins/DocTypeGridEditor/Config/grid.editor.config.js is:

    {
        "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": [],
            "nameTemplate": "",
            "enablePreview": true,
            "viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
            "previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
            "previewCssFilePath": "",
            "previewJsFilePath": ""
        }
    }
    

    ... and at /App_Plugins/GridEditors/package.manifest is (abridged):

    {
      "gridEditors": [
        {
          "name": "Accordion Widget",
          "alias": "accordionPod",
          "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
          "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
          "icon": "icon icon-window-sizes",
          "config": {
            "allowedDocTypes": [
              "^accordionPod$"
            ],
            "enablePreview": true,
            "viewPath": "",
            "previewViewPath": "/Views/Partials/Pods",
            "previewCssFilePath": "/css/admin.min.css"
          }
        },
        {
          "name": "Global Content Pod Picker",
          "alias": "singlePodPickerEditor",
          "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
          "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
          "icon": "icon icon-grid",
          "config": {
            "allowedDocTypes": [
              "^singlePodPicker$"
            ],
            "enablePreview": true,
            "viewPath": "",
            "previewViewPath": "/Views/Partials/CustomGridEditors",
            "previewCssFilePath": "/css/admin.min.css"
          }
        },
        ...
      ]
    }
    

    This is not a project I have set up so apologies for any glaring mistakes I may have overlooked!

  • Matthew Wise 271 posts 1373 karma points MVP 4x c-trib
    Mar 13, 2019 @ 12:26
    Matthew Wise
    0

    Any Umbraco redirects? From renaming nodes I know this does ignore query string a long shot I know

    I cant see anything in the config that jumps out compared to my own...

    Though I have never used the previewViewPath ... just the viewPath

    Matt

  • Matthew Kirschner 323 posts 611 karma points
    Apr 30, 2019 @ 19:33
    Matthew Kirschner
    1

    Hi, Kieron.

    Was this ever resolved?

    I'm running into the exact same issue now after updating to Umbraco 7.14 and DTGE 0.6.1. This is on my dev machine and I have no redirects setup.

  • Matthew Kirschner 323 posts 611 karma points
    Apr 30, 2019 @ 20:19
    Matthew Kirschner
    0

    My issues were resolved (as usual) by incrementing the version number in ClientDependency.config.

  • Kieron McIntyre 116 posts 359 karma points
    May 01, 2019 @ 08:48
    Kieron McIntyre
    0

    Rolling the CD didn't work for me, neither did the app restart gubbins.

    A developer working on the project had upgraded the DTGE package for no obvious reason and so I downgraded it back to 0.51. This fixed the issue for me.

    However, there was another issue I was having with the backoffice too which may have been causing issues https://our.umbraco.com/forum/umbraco-7/using-umbraco-7/60627-417-Missing-token-in-the-backoffice

Please Sign in or register to post replies

Write your reply to:

Draft