U4-5127 - AssetService does not support virtual paths (~/)

Created by Tom Fulton 23 Jun 2014, 16:11:55 Updated by Tom Fulton 29 Jun 2015, 23:42:34

Relates to: U4-5128

Relates to: U4-6428

Relates to: U4-6774

When running from a virtual directory, we need to prefix our paths with ~/. However, the assetsService does not seem to expand these to the full path.

Ex: assetsService.loadCss("~/App_Plugins/Archetype/css/archetype.css");

Tries to load:

`http://mysite/my-virtual-directory/umbraco/~/App_Plugins/Archetype/css/archetype.css?umb__rnd=7.1.3.10862031871`

Comments

Sebastiaan Janssen 23 Jun 2014, 16:18:47

You'll find that there's quite a few more issues with running in a vdir. If at all possible, it should be avoided.


Tom Fulton 23 Jun 2014, 17:54:42

Thanks, good to know! Do you know the specifics of any of the issues? Wondering if there's anything major or is it all minor stuff like this?

Happy to help fix things like this (just sent a [PR|https://github.com/umbraco/Umbraco-CMS/pull/419] for the other one), but yeah, if there's something major perhaps we should reconsider...


Sebastiaan Janssen 23 Jun 2014, 22:20:07

Plenty of issues in the tracker. Your PR may fix some but it's mostly packages that will be problematic.


Shannon Deminick 19 Mar 2015, 00:49:54

fixed in 1a082464e98bfd4a8515ecd44b87aa0711622287


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Easy

Category: Extensibility

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.2.0, 7.1.3, 7.1.4, 7.1.5

Due in version: 7.2.3

Sprint:

Story Points:

Cycle: