Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-2670

Wrong links saved by fckeditor when the page path starts with a directory = context path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 4.0, 4.0.1
    • core
    • None

    Description

      This happens if you try to link a page which path starts with the same string as the context path, i.e.:

      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

        Attachments

          Activity

            People

              pbaerfuss Philipp Bärfuss
              fgiust Fabrizio Giustina
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD