[PAGES-447] Can't add child page with the same name as another parent's sibling Created: 12/Apr/21  Updated: 14/Jun/21  Resolved: 11/Jun/21

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

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Martin Haderka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File error.png     PNG File item-value.png     PNG File path-value.png    
Issue Links:
Problem/Incident
Relates
relates to MGNLUI-6735 NodeNameValidator doesn't work at roo... Closed
dependency
depends upon MGNLUI-6455 nodeNameValidator doesn't work correc... Closed
supersession
supersedes MGNLUI-6678 Creating a page with an identical nam... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
[X]* Verify if MGNLUI-6455, PAGES-418, MGNLUI-6678 are fixed as well
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: UI framework implementation
Sprint: UI FW 30
Story Points: 5

 Description   

Steps to reproduce

  1.  Create a parent page
  2.  Create a child page called child
  3.  Create a child page called another-child
  4.  Select the page another-child and try to create a page called child

Expected results

The page is created

Actual results

The page is not created because the NodeValidator returns an error indicating the page already exists (tho it doesn't)

Workaround

N/A

Development notes

At info.magnolia.ui.editor.validator.NodeNameFieldValidatorFactory.createValidator() method, the isFailure method is checking if the page you want to create already exists on the parent path instead of checking within the same level.

Please check the attachments. item-value.png shows the path within the new node is going to be created (/parent/another-child). The new node is going to be called child.

As you can check in the pages structure, there is a child node called child and another child called another-child, so the path parent/another-child/child should be available.

Anyways, the validator checks if a path like /parent/child exists, tho this is not the path that is going to be created (check path-value.png image).

The validator fails tho the page path is available (check error.png image).


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