umco / umbraco-nested-content

Nested Content for Umbraco 7.1 to 7.6
https://our.umbraco.org/projects/backoffice-extensions/nested-content
MIT License
45 stars 35 forks source link

Nested Contents doesn't work with umbraco installations from "subfolder" #77

Closed simonech closed 7 years ago

simonech commented 8 years ago

If my umbraco installation is http://example.com/whatever/umbraco instead of http://example.com/whatever/umbraco, the view for the property editor gives a 404. I think the problem is that the location of the view is defined in NestedContentPropertyEditor as

[PropertyEditor(NestedContentPropertyEditor.PropertyEditorAlias, "Nested Content", "/App_Plugins/NestedContent/Views/nestedcontent.html", ValueType = "JSON")]

instead of being specified in the package.manifest or at least by specifying the url with ~/

mattbrailsford commented 7 years ago

@simonech found an issue with the PR submitted. App relative paths (~/) for prevalue control views defined using the PreValueFieldAttribute do not resolve in the prevalue editor (could be an umbraco version thing as I'm testing in 7.2.2) so had to revert this change back.

Re-opening the issue until this gets resolved.

mattbrailsford commented 7 years ago

See commit beeec26b4f3d2686fb65d923c0815685dae8cde1 for reverted code

mattbrailsford commented 7 years ago

@simonech is this something you are able to take a look at?

simonech commented 7 years ago

I'll have a look

simonech commented 7 years ago

@mattbrailsford Looking into it now: the problem you see is it with a umbraco as root apps, or with umbraco as sub-folder?

simonech commented 7 years ago

You mean this part doesn't appear? image

simonech commented 7 years ago

If you say you tested in umbraco 7.2, it was a bug in umbraco back then, that has been solved in 7.3 http://issues.umbraco.org/issue/U4-6775

So, if you want to support 7.2 the only way would be to specify all the configuration in the package.manifest file instead of using the PreValueField attribute. Otherwise, just re-apply my changes to the code and it works from 7.3 forward or don't care about people installing umbraco in sub-folder and do nothing... up to you :)

simonech commented 7 years ago

I've seen you implemented the same change on vorto... so I guess we can go back to having the ~ in the prevalues... I'll sent a PR again, with the same change

jessetinell commented 7 years ago

I'm having the same problem now. I see the ~ has now been removed since this was fixed. Do you have any ideas for a better fix?

leekelleher commented 7 years ago

@jessetinell Currently NestedContent is built against Umbraco v7.1.4, so we'll need to bump up the minimum version number to build against, (most likely at least v7.3.x). We do have plans for this, but haven't done this yet.

leekelleher commented 7 years ago

Closing ticket, reasons given on PR https://github.com/umco/umbraco-nested-content/pull/97#issuecomment-324592901

simonech commented 7 years ago

Sounds right... could have also implemented the manifest file instead of the attributes on the class. anyway... Umbraco 7.7 FTW :)