2

I am facing issue with Assets path with version number in DXA 1.4. I have installed DXA 1.4 along with all required services with SDL web 8.1 on single machine as per the installation instruction.

Staging website showing all content correctly without CSS, JS files.

Because JS, CSS files have the version no in the Path as below: http://localhost:8888/system/v1.4/assets/css/main.css

But I am able to access main.css without version no in the path as below. http://localhost:8888/system/assets/css/main.css

Can someone please guide me where I am missing.

I have enabled debug logs but still no luck

Logs:

2016-05-26 05:07:28,954 [9] DEBUG - CdApiLocalizationResolver.ResolveLocalization() exit. Duration: 178 ms. 2016-05-26 05:07:28,954 [9] WARN - No matching Localization found for URL 'http://localhost:8888/system/V1.4/assets/css/main.css'. Sending HTTP 404 (Not Found)

Bigger logs:

Asset loading issue with DXA 1.4

More Over One of my colleague also install DXA with the same step as I did, everything is working fine for him, the only difference is that I have also installed contextual image delivery service (But this service is working fine for me, Showing images properly on the site ). May be this has some connection with this issue.

GetTtmMapping result:

CmEnvironmentId     : SDLWebcmsample_local
PublicationId       : tcm:0-6-1
EnvironmentPurpose  : Staging
WebApplicationId    : Website2_RootWebApp
RelativeUrl         : /
PrimaryMappedUrl    : http://localhost:8888/
IsOffline           : False
CdEnvironment       : 
Id                  : Mapping2
ExtensionProperties : {}

CmEnvironmentId     : SDLWebcmsample_local
PublicationId       : tcm:0-1-1
EnvironmentPurpose  : Staging
WebApplicationId    : visitorsweb_RootWebApp
RelativeUrl         : /
PrimaryMappedUrl    : http://localhost:82/
IsOffline           : False
CdEnvironment       : 
Id                  : visitorswebmapping
ExtensionProperties : {}
7
  • the version number in the path is only there for circomventing browser cahcing after an HTML design change. if the URL localhost:8888/system/assets/css/main.css works then also localhost:8888/system/v1.4/assets/css/main.css should work, or any string inbetween system and assets. Are there any errors logged when you see the page without styling? Commented May 26, 2016 at 11:07
  • There is no Logs as such, It just throwing 404 error for all types of assets files i.e main.css, header.js, main.js, xpm.js. and site only shows content and images Commented May 26, 2016 at 11:38
  • did you try to set the log level to debug and see if there is anything interesting mentioned then? Commented May 26, 2016 at 11:49
  • ^ perhaps add a larger log except into the question above. Commented May 26, 2016 at 12:15
  • the error "No matching Localization found for URL" indicates a slightly different issue I would think, so seems there is something strange happening. We would definitely benefit from a larger extract from the debug logs. Please edit the question and update. Commented May 26, 2016 at 13:08

1 Answer 1

1

Looking at a working installation you can call all the following URLS:

http://dxa.azurewebsites.net/system/assets/scripts/header.js http://dxa.azurewebsites.net/system/v1.4/assets/scripts/header.js http://dxa.azurewebsites.net/system/v2016/assets/scripts/header.js

(try it, this is a live DXA site running from Azure)

As you can see you can substitute any version string between system and assets as long as it starts with a lowercase v and followed by a number.

Now your log extract (if it was correctly copied and pasted) contains a capital V in the version number string, which won't work, so the 404 on that log extract is correct. However the screenshot of the log (interesting way to provide a log), shows URLs which should be working, provided the HTML desiogn was correctly published.

If you are absolutely certain you followed all installation steps and have a working Web 8 envrionment, then I don't know what is going wrong here. In which case I think it is less work to ditch it and just reinstall from scratch, than to try and debug it and find what went wrong.

Another option wopuld be to launch a DXA web app on Azure, and connect that to your CMS. See the details on how to start it in my blog post here https://community.sdl.com/products-solutions/solutions/customer_experience_cloud/digital-experience/tridion/tridion-developer/b/weblog/archive/2016/05/13/dxa-in-the-microsoft-azure-marketplace

Once started that will be working, then you can connect it to your own CIS and see if that is still working. If not, you know you have an issue in your CIS environment, like a topology mismatch (or not everything is published is it should be). If this does work fine, then you know something is incorrect in your local DXA web app installation, so it helps you to easily pin point the location of the problem. Same story for your other related question (Problem with DXA 1.4, pages all not rendering without .Html extension), I'm pretty sure once this is solved, the other issues you are seeing will also be solved.

3
  • I have drill down the installation, but didn't find any solution, but I see a strange behaviour that same code run fine with localhost:90 port and if I change the port no in IIS for this site to 8888 and then by using URL localhost:8888, It is not loading assets. I have checked all configuration and settings around port 90, but I didn't find anything, I don't understand from where It is taking reference and work with port 90. Though all settings are enabled for port 8888. Commented Jun 15, 2016 at 5:56
  • 1
    @PiyushJain you can't just change the ports of the web application without updating the base URL mapping in Topology Manager. Can you edit your question and add the results of the PowerShell Command Get-TtmMapping? Also as mentioned, if you are sure you didn't miss any installation steps, just dump the installation and redo it (the web application part) or try connecting an Azure DXA site to your CIS. Trying to figure out the problem is going to take you way more time than to just ditch it and reinstall the web application part, which is only a few minutes. Commented Jun 15, 2016 at 7:10
  • updated my question with Get-TtmMapping result. Commented Jun 15, 2016 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.