[MGNLUI-6704] datasource-rootPath is ignored when saving data. Created: 20/Oct/20  Updated: 13/Jan/22  Resolved: 28/May/21

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

Type: Improvement Priority: Neutral
Reporter: Mercedes Iruela Assignee: Canh Nguyen
Resolution: Fixed Votes: 3
Labels: VN-Implementation, headless-team-support
Remaining Estimate: Not Specified
Time Spent: 3d
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2021-05-28 at 14.24.59.png    
Issue Links:
Cloners
is cloned by MGNLUI-7013 datasource-rootPath is duplicated if ... Closed
Relates
relates to MGNLUI-6129 datasource-rootPath is ignored when i... Closed
relates to MGNLCT-175 Auto initialize content type datasour... Accepted
causality
duplicate
relation
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)
Release notes required:
Yes
Date of First Response:
Epic Link: Support
Sprint: HL & LD 29
Story Points: 5

 Description   

Steps to reproduce:

  1. (using datasource example in documentation)
  2. include rootPath in datasource:
    datasource:
      workspace: tourguides
      rootPath: /tours
      namespaces:
        mt: https://www.magnolia-travel.com/jcr/1.0/mt
      autoCreate: true
    
    model:
      nodeType: mt:tourGuide
      properties:
        - name: birthday
          type: Date
        - name: gender
        - name: shortBio
    
  1. Open tourGuide app
  2. Create a new tour and save it

Current result

The new tour is not displayed in the browser view, since it is taking into consideration /rootPath (see MGNLUI-6129). If you use the JCR Browser app to see the tourguides workspace, you will see that the tour was included in root (//) instead of taking into consideration rootPath (/tours)

Expected result

The new tour should have been stored in rootPath instead of root.

NOTES:
When the app is opened an error comes up if there is path tours does not exist in advance.
When validating the tour name, it is taking into consideration root instead of rootPath



 Comments   
Comment by Joseph Kamwena [ 04/Feb/21 ]

I might add two odd  findings on this issues...

one

the default 'add folder' action (populated automatically by the content app UI6) is creating the folder in the correct path.

in other words: it's creating the folder in accordance to the rootPath property defined in the datasource.

 

two

Adding an item in that folder, results in the expected behaviour.

 

Comment by Christopher Zimmermann [ 28/Apr/21 ]

Could be introduced in 6.2.

Check if the problem is also present in M5 UI... 5.7.

Comment by Simon Tourville [ 10/May/21 ]

This very annoying...

Our users creating new items complains that they lose there information... because the rootPath is ignore and it creates it in "/".

Still in 6.2.8. Any plan to fix it?

Comment by Christopher Zimmermann [ 11/May/21 ]

Yes we plan to bring this into an upcoming sprint. I would anticipate that we will have a code fix by start of June or mid June, and then it would be included in the following Magnolia release.

Comment by Jaroslav Simak [ 31/May/21 ]

Closing this one, follow-up MGNLCT-175 to resolve the issue when rootPath does not exist.

Generated at Mon Feb 12 09:39:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.