Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I love this package, but one thing I don't really get is why the preview mechanism uses a request to http://mysite.com/<current-node-id>?dgtePreview=1 for its preview functionality?
This requires the settings disableFindContentByIdPath to be set to false in umbracoSettings.config (<web.routing> element).
Setting this to false (which I believe is actually the default for some reason) means any user in the world (including malicious ones) can get a complete list of all node IDs present in the site's Umbraco installation (by just running http://mysite.com/<node-id>; for all integers and check the response.
While I am not sure if this poses a security issue, we like to not unnecessarily open doors. In addition, it makes no sense for a website to respond to a /<node-id> path anyway.
Therefore we prefer to have this setting set to true. Of course, that breaks DTGE so that's not always an option.
Long story short; would it be possible to change the preview mechanism to not rely on this fairly odd Umbraco functionality? Perhaps just use an API controller to render the preview partial view HTML -- although I know rendering a (partial) view in an API controller is not as easy as I would want it to be.
Thanks for raising this. I wasn't aware of the disableFindContentByIdPath option in umbracoSettings.config.
DTGE's previewer has long been a thorn in my side. The original design decision was made 3 years ago and any hiccups were worked around.
I have been wanting the preview mechanism to be completely refactored - but time, effort and dealing with backwards-compatibility have been a problem.
See here for various efforts over the years: https://github.com/umco/umbraco-doc-type-grid-editor/issues?utf8=%E2%9C%93&q=is%3Aissue+in%3Atitle+preview
I appreciate that it's frustrating.
For this specific disableFindContentByIdPath=true issue, I've opened a ticket on our GitHub repo: https://github.com/umco/umbraco-doc-type-grid-editor/issues/109
It has details about the unfinished previewer (in the feature/preview-unpublished branch). Which does use a WebAPI controller to render the partial. It's on the right track, needs more dev hours and testing (to make sure backwards-compatibility is good).
Thanks for your quick and detailed response. Good to hear there is already some work done on a new preview mechanism. Hopefully some people from the community can help with finishing the feature. I'm a bit full atm myself but let's see if I can also find some time in the near-ish future :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted