View Full Version : [FIXED] .xds urlPrefix vs urlPrefixTemplate issue

29 Nov 2016, 7:51 AM
In my architect project I have some "external" css resources that are outside of the architect project folder, but are within my web root (AKA UrlPrefix). So I add them as resources with relative paths to my web root. They all begin with a slash.

I've found that sometimes I cannot load the CSS resources in architect, and I discovered that some of my .xds files contain both a "urlPrefix" and a "urlPrefixTemplate" property. The two settings are overriding each other!

There is nowhere in architect to configure both of these settings. If I clear out the Url Prefix setting from the Project Settings screen in Architect, only the "urlPrefixTemplate" property gets cleared out.

If I manually edit the .xds file and set"urlPrefixTemplate" and "urlPrefix" to my desired value, then I can load CSS resources successfully.

This only seems to happen when I create a new project in a recent version of architect. My old projects I've converted don't have this issue.

Why are there 2 configs, but only 1 setting in architect?


30 Nov 2016, 6:05 AM
The urlPrefix is the actual url which is used, the template is used to generate the url prefix. Because from Cmd 6.2 the random port for app watch is used.

But I think that if you edit it in the preferences the url it should be working or not? If you write there http://dev.local/StockList/


30 Nov 2016, 7:38 AM
I see.

That appears to be a architect system-wide preference, but it is saving the setting in the project file? That doesn't make sense.

I tested this out, but it doesn't work that way.

I used this setup, and the project setting will modify "urlPrefixTemplate", however nothing will change "urlPrefix".

I do not use build tools, or sencha cmd. They are currently OFF.

I think this is a bug in that case. If I have build tools off, urlPrefix should clear itself out. And my issue with loading CSS resources should be fixed. Do you think this is a bug?

There is another property in the .xds json "lockUrlPrefix" which I don't see any settings for, but may be related.

It sure would be nice if there were "advanced" settings in architect that allowed all the settings to be changed!

Currently my solution is to manually edit the .xds file and clear out "urlPrefix". This is dirty!


30 Nov 2016, 7:55 AM
I see. This is definitively bug. The urlPrefix is regenerated from urlPrefixTemplate only when you open the preview window, it should be regenerated on the project save.

The best workaround for you currently is that manual edit of the .xds file.

The lockUrlPrefix is obsolete config I know that it used to be in the UI settings for the old Cmd 5. Not sure if it's used anywhere anymore.

And you are right that this seems like a general SA settings rather than project settings but I can imagine some cases where it could be useful to have it also the project settings. For example you can work on different projects with different url settings.

Thanks for the inputs