[PAGES-482] Page names containing dots cause errors when defaultExtension is empty Created: 23/Jul/21  Updated: 16/Aug/22

Status: Open
Project: Magnolia pages module
Component/s: None
Affects Version/s: 6.2.9
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jonathan Ayala Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2021-07-23 at 16.19.31.png    
Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: AuthorX Support
Team: AuthorX

 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

 


Generated at Mon Feb 12 06:19:23 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.