Copied to clipboard

Flag this post as spam?

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


  • NicolaiJee 30 posts 91 karma points
    Apr 19, 2018 @ 05:37
    NicolaiJee
    0

    404 on GetContentTypeIcon and /~/4931?dtgePreview=1

    Hi I have upgraded a site to use 0.5.0 version og DTGE and i have moved the editors to the grid.editors.config.js file But when ever i want to view content i get 404 errors on the urls: /~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentTypeIcon?contentTypeAlias=gridHero /~/4931?dtgePreview=1

    I am using an umbraco 7.9.5 installation and the editor configuration looks like this: { "name": "Hero", "alias": "docTypeGridHero", "view": "/AppPlugins/DocTypeGridEditor/Views/doctypegrideditor.html", "render": "/AppPlugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml", "icon": "icon-umb-media color-blue", "config": { "allowedDocTypes": [ "gridHero" ], "nameTemplate": "", "enablePreview": true, "viewPath": "/Views/Partials/GridModules/", "previewViewPath": "/Views/Partials/GridModules/", "previewCssFilePath": "", "previewJsFilePath": "" } } I have been trying many different things the past 24 hours with out any luck. Any ideas ?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 19, 2018 @ 08:50
    Lee Kelleher
    0

    Hi Dr. Chaos! (cool name)

    The "/~/" part at the start of the URL has caught my eye. Is that part of the actually URL that is being requested (returning a 404)? or something that you've edited in this post?

    Thanks,
    - Lee

  • NicolaiJee 30 posts 91 karma points
    Apr 19, 2018 @ 09:01
    NicolaiJee
    0

    Hi Lee That is the actual url. I dont understand why it is like that ?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 19, 2018 @ 09:25
    Lee Kelleher
    0

    Very strange that it's got the "/~/" bit.

    Going over DTGE's code (to mentally debug it), the call to getContentTypeIcon is here:

    https://github.com/umco/umbraco-doc-type-grid-editor/blob/develop/src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.resources.js#L24

    Which then calls Umbraco's convertVirtualToAbsolutePath - so to resolve any virtual paths:

    https://github.com/umbraco/Umbraco-CMS/blob/release-7.9.5/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js#L20-L31

    So since DTGE is passing through "~/umbraco/backoffice/DocTypeGridEditorApi..." (snipped), then the convertVirtualToAbsolutePath should be prefixing Umbrco's applicationPath URL.

    ...and that should value should come from the Request object: https://github.com/umbraco/Umbraco-CMS/blob/release-7.9.5/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs#L392

    Hmmm, it doesn't make sense. Unless if DTGE JS files have been modified?

    Thanks,
    - Lee

  • Ben Palmer 180 posts 866 karma points c-trib
    Apr 19, 2018 @ 09:36
    Ben Palmer
    1

    Hi guys,

    We're running in to the same issue across projects - we think this is the latest version of Chrome (66.0.3359.117) using several projects on Umbraco 7.7.6 and 7.10.0.

    It's not specific to Doc Type Grid Editor as it seems to be affecting an admin stylesheet that we have imported through a package.manifest file.

    We're looking at the issue but it appears to be causing problems with URLs using tildes.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 19, 2018 @ 09:43
    Lee Kelleher
    0

    Thanks Ben. Not good that it's happening - but comforting that it's not just DTGE playing up.

    I'm curious, are you using a virtual directory for Umbraco?

  • Ben Palmer 180 posts 866 karma points c-trib
    Apr 19, 2018 @ 10:01
    Ben Palmer
    0

    Agreed, I nearly post on the Github issues board until I saw it was affecting our stylesheet as well!

    We don't have Umbraco in a virtual directory and we can see this on servers and our local copies running from VS projects.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Apr 20, 2018 @ 07:34
    Sebastiaan Janssen
    0

    Hey Ben, any chance you can show me the package.manifest file to see how I can reproduce this specific problem? I just want to know how to trigger it to break, no need to show everything, just an example is fine too.

  • NicolaiJee 30 posts 91 karma points
    Apr 19, 2018 @ 10:09
    NicolaiJee
    0

    Hi I can confirm that everythings is working in IE but not in chrome. I am also looking into the problem in chrome.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 19, 2018 @ 17:06
    Lee Kelleher
    1

    Hey guys, I think we've figured this out. Chrome 66 introduces the string.trimStart function, which appears to work differently than Umbraco's polyfill implementation of it.

    See our full working out here: https://github.com/umco/umbraco-doc-type-grid-editor/issues/97

    To note, this isn't really a DTGE concern, it's a Chrome 66 + Umbraco concern.

    Cheers,
    - Lee

  • Janae Cram 63 posts 439 karma points MVP 8x c-trib
    Apr 19, 2018 @ 17:23
    Janae Cram
    4

    Umbraco issue created :) I referenced this thread, but if anyone has any other follow-up comments for the team, please feel free to post on the issue itself!

    http://issues.umbraco.org/issue/U4-11253

  • Osman Coskun 170 posts 404 karma points
    Jun 29, 2018 @ 10:07
    Osman Coskun
    0

    The problem also has been detected on Firefox 61.0, Opera 53.0 and Chrome 67.0.

    Thanks for the solution; h5yr!

  • NicolaiJee 30 posts 91 karma points
    Apr 19, 2018 @ 18:01
    NicolaiJee
    0

    Cool thanks :)

Please Sign in or register to post replies

Write your reply to:

Draft