Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
4.0, 4.0.1
-
None
Description
This happens if you try to link a page which path starts with the same string as the context path, i.e.:
- webapp is mapped to http://server/myapp
- in magnolia you have a page /myapp/page,html
- the full url of the page is http://server/myapp/myapp/page.html
Any link to /myapp/page.html added from fckedit is converted to /page.html, stripping part of the url only because is similar to the context path.
This is done in SaveHandlerImpl line 467:
String link = StringUtils.removeStart(src, MgnlContext.getContextPath());
The link added from fckedit doesn't have the context path from the beginning, so this check will remove part of the url. Removing the check will make links working when added from the UI, not sure if we need it to support manually written urls that may contain the context path
Checklists
Acceptance criteria