We have moved to GitHub Issues
Created by Tom Fulton 29 Jun 2015, 23:46:16 Updated by Shannon Deminick 02 Jul 2015, 08:30:16
Note, this is an add-on to an older issue U4-5128 - that fix was for the
PropertyEditor attribute, this is the same fix for the
When defining a PreValueField via an Attribute, like so:
[PreValueField("archetypeConfig", "Config", "~/App_Plugins/Archetype/views/archetype.config.html", Description = "(Required) Describe your Archetype.")]
The View field does not support virtual paths (/), you'll get a 404 looking for "/umbraco//yourdir/....". This works fine when defining from a
package.manifest file, just not through Attributes.
Pull request here: https://github.com/umbraco/Umbraco-CMS/pull/737
Thinking more on this, I wonder if it's not a good practice to rely on package developers to add the tilde to make their packages support virtual directories. Could there be a better way to make this just work automatically? Could we prepend the tilde ourselves - or is there a chance someone actually might want the root?
I'm pretty sure this works already with relative paths, for example when just specifying a view like "test.html", it will look into the specific pre-values view folder, but I'm pretty sure you could do "../../../App_Plugins/..." (or whatever the path would be).
But anyways, the virtual path support is good!
@Shandem Yeah, I remember you saying that
../ would work too, but I'm not sure this solves the issue, because package developers would need to account for this (by changing the paths in their attributes to ../../App_Plugins/ etc), but then this would probably break their package for non-VD installs.
I'm wondering if there's a way to make this just work automatically without having package devs need to worry about it. Glad to try working on something but struggling with the best way to approach :)
I don't understand why you'd say it would be any different for vdirs vs non vdirs? In any case, relative or virtual paths with tildas should always work ... unless someone configures the 'umbraco' folder to be something totally insane like /blah/blah/blah
Difficulty: Very Easy
Backwards Compatible: True
Fix Submitted: Pull request
Affected versions: 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.1, 7.2.0, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.1.6, 7.1.7, 7.1.8, 7.1.9, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6
Due in version: 7.3.0