[PAGES-60] Page node names that contain ~ (tilde) cannot be rendered Created: 02/Mar/16  Updated: 24/Oct/16  Resolved: 23/Mar/16

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: 5.4.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Philip Mundt Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PAGES-61 DefaultValue does not work for page p... Closed
relates to MGNLUI-3795 Node names from content apps that con... Closed
causality
is causing MAGNOLIA-6836 Can't preview successfully-published ... Closed
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

 Description   

It is currently possible to add a page with node name that contain ~ resulting in a un-renderable page.

To reproduce

  1. Goto page app
  2. Add new page with page name test~page
  3. Preview page: you should get a 404

Source

The ~ (tilde) is a reserved character due to being used as selector delimiter (see info.magnolia.cms.core.Path#SELECTOR_DELIMITER).

Considered solutions

  • prevent entering the ~ as part of a page name e.g. by validation or
  • always sanitize the path (by replacing tilde with e.g. dash) upon storage.
  • support both selector or node-name when there's no ambiguity (and specify who should win otherwise)


 Comments   
Comment by Philip Mundt [ 23/Mar/16 ]

Fixed by adding custom CreatePageAction, see PAGES-61.

Super class' info.magnolia.ui.admincentral.dialog.action.SaveDialogAction#setNodeName(Node, JcrNodeAdapter) uses info.magnolia.cms.core.Path#info.magnolia.cms.core.Path#getUniqueLabel(javax.jcr.Session, java.lang.String, java.lang.String) internally.

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