core
core copied to clipboard
Relative Paths are not working on dotCMS 5.0
Relative Paths are not working on dotCMS 5.0
Expected Behavior
Relative paths like:
<link media="all" rel="stylesheet" type="text/css" href="css/main.css">
Current Behavior
Only absolute paths are working:
<link media="all" rel="stylesheet" type="text/css" href="/css/main.css">
Possible Solution
N/A
Known Workarounds
Use absolute paths
Steps to Reproduce (for bugs)
- Create a page and add css with relative path
Context
Slack thread: Slack Support Ticket reference: #96399
Your Environment
- dotCMS version used: 5.0
- Browser Name and version: any
- Operating System and version: any
- Application Server and version:
- Java Brand and version:
- Database and version:
- Application module (if apply):
The fix is to add <base href="/" /> but only if is not coming form the client.
This is not with sass, right? Relative paths should in html should have nothing to do with dotcms. I am pretty sure they are working and something else is happening.
Fixed, tested on master // Postgres // FF
Fixed, tested on release 5.0.2 and works as expected