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 ?
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?
So since DTGE is passing through "~/umbraco/backoffice/DocTypeGridEditorApi..." (snipped), then the convertVirtualToAbsolutePath should be prefixing Umbrco's applicationPath URL.
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.
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.
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.
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!
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 ?
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
Hi Lee That is the actual url. I dont understand why it is like that ?
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 theconvertVirtualToAbsolutePath
should be prefixing Umbrco'sapplicationPath
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
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.
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?
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.
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.Hi I can confirm that everythings is working in IE but not in chrome. I am also looking into the problem in chrome.
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
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
The problem also has been detected on Firefox 61.0, Opera 53.0 and Chrome 67.0.
Thanks for the solution; h5yr!
Cool thanks :)
is working on a reply...