U4-7083 - File system discrepancies

Created by Shannon Deminick 09 Sep 2015, 19:59:26 Updated by Stephan 10 Sep 2015, 12:22:46

I will have to assume it's the latest changes to the file system services but there are now discrepancies between the file paths returned.

The result from:

FileService.GetStylesheetByName

returns an object with a path with backslashes:

sub\subbb\asdfasdfasdf.css

It's virtual path still contains forward slashes correctly:

/css/sub/subbb/asdfasdfasdf.css

but the result from:

FileService.GetScriptByName

returns an object with a path with forward slashes:

blah/blah/blah/asdfasdf.js

It's virtual path still contains forward slashes correctly:

/scripts/blah/blah/blah/asdfasdf.js

Comments

Shannon Deminick 09 Sep 2015, 20:00:18

Due to this issue, the CleanForXss calls in the editScript vs editStylesheet editors is slightly different, but they should be the same


Stephan 10 Sep 2015, 11:25:29

Running some tests on 7.2.8 and 7.3 to figure out what/how to fix.

Virtual paths should ''always'' use forward-slashes - and that seems to work.

Normal "paths" seem to always return back-slashes, even though they accept forward-slashes as input. *IMHO we should use forward-slashes everywhere but that would break compat = not changing. *Fixing 7.3 to maintain compatibility for scripts

However there are also some weird things: *if a stylesheet or script or partial view is created with a path such as "path/foo.js", the created script .Path remains "path/foo.js" although if you get the script, the path is "path\foo.js" - guess we should update the .Path of the saved entity *if you Get() a missing script or partial view, you get null, whereas for a missing stylesheet it throws - we should align on returning null


Stephan 10 Sep 2015, 12:22:27

Pushed 3314ab026bf00205a092921aa119681e7e9eea2d and a few others (just before) that align 7.3 with 7.2.8 wherever possible, ie wherever we're not fixing an issue.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Stephan

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.3.0

Sprint:

Story Points:

Cycle: