core icon indicating copy to clipboard operation
core copied to clipboard

Relative Paths are not working on dotCMS 5.0

Open manuel-miranda opened this issue 8 years ago • 4 comments

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)

  1. 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):

manuel-miranda avatar Aug 17 '18 15:08 manuel-miranda

The fix is to add <base href="/" /> but only if is not coming form the client.

fmontes avatar Aug 17 '18 17:08 fmontes

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.

dotcmsCodeReview avatar Aug 20 '18 12:08 dotcmsCodeReview

Fixed, tested on master // Postgres // FF

bryanboza avatar Sep 05 '18 18:09 bryanboza

Fixed, tested on release 5.0.2 and works as expected

bryanboza avatar Sep 17 '18 21:09 bryanboza