Affects Version/s: 6.1.20 EE GA2
When theme css files are accessed they get aggregated into a single main.css file, but the relative paths are not transformed so the main.css will not be able to point to the right resource if the custom css is not in the same directory level as main.css.
The attached test theme contains a test.css file in /<theme-root>/css/subdir/subdir2 which references an image using relative path:
1. Start a fresh portal with these properties
2. Deploy the attached war (i.e. test-theme-18.104.22.168-without-cache.war)
3. Change to the test theme (Manage -> Site Pages)
4. Verify that the images have valid paths e.g. using firebug -> css tab -> search t1.jpg, t2.jpg etc.
5. Restart server with the above properties commented out
6. Verify that images have bad paths
Another way to reproduce the same type of issue:
- Start Liferay using non-root context-path (set portal.ctx=/unique in the portal-ext.properties)
- Rename tomcat-7.0.42\webapps\ROOT to tomcat-7.0.42\webapps\unique
- Rename tomcat-7.0.42\conf\Catalina\localhost\ROOT.xml to tomcat-7.0.42\conf\Catalina\localhost\unique.xml
- In ROOT.xml (now unique.xml) change:
- Start the portal instance
Navigate to http://localhost:8080/unique and login
- Go to Control Panel -> Dynamic Data Lists
- Create a new dynamic data list
- Go to the "View all"-tab of the dynamic data lists and click "Actions" -> "Spreadsheet View" on the created data list
- Press F12 in your browser and check the network tab.
There will be a 404 GET-Request to the following URL: "http://localhost:8080/assets/skins/sam/sprite.png".