Uploaded image for project: 'Magnolia pages module'
  1. Magnolia pages module
  2. PAGES-482

Page names containing dots cause errors when defaultExtension is empty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Neutral
    • None
    • 6.2.9
    • None
    • None

    Description

      h2. Steps to reproduce

      1.  Set configuration /server@defaultExtension to "" (empty String)
      2.  Create a page with the Title (node name): Housing Prices Increased by 6.2 Percent
      3. Open the page details in the pages app or preview in the frontend

      Expected results

      There must be no errors since dots are allowed for node names according to info.magnolia.jcr.util.NodeNameHelper.getValidatedName(String, String) javadoc

       /**
           * If charset equals <code>UTF-8</code>, replaces the following characters with a dash <code>-</code> :
           * <p>
           * Jackrabbit not allowed {@code 32: [ ] 91: [[] 93: []] 42: [*] 34: ["] 58 [:] 92: [\] 39 :[']}
           * <p>
           * URL not valid {@code 59: [;] 47: [/] 63: [?] 43: [+] 37: [%] 33: [!] 35:[#] 94: [^]}.
           * <p>
           * Otherwise, replaces illegal characters with a dash <code>-</code> except for {@code [_] [0-9], [A-Z], [a-z], [-], [_], [.]}.
           * <p>
           * Please notice that a valid name can not begin with dot or period <code>[.]</code>.
           *
           * @return a validated name for a node.
           */
          public String getValidatedName(String name, String charset) 

      Actual results


      Preview page throws a 404 error and logs shows:

      INFO  info.magnolia.cms.beans.config.MIMEMapping        : Cannot find MIME type for extension "2-Percent" 

      Workaround

      Renaming existing page nodes

       

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jayala Jonathan Ayala
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD