[PAGES-860] Annotations endpoint should return missing templates also Created: 04/Oct/22  Updated: 18/Dec/23

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

Type: Improvement Priority: Neutral
Reporter: Phong Le Quoc Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File full.png     PNG File missing-component-with-area.png     PNG File missing-templates.png    
Issue Links:
relation
is related to PAGES-843 Annotations endpoint should not fail ... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PAGES-861 Implementation Sub-task To Do  
PAGES-862 Review Sub-task To Do  
PAGES-863 Pre-Integration QA Sub-task To Do  
PAGES-864 QA Sub-task To Do  
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)
Epic Link: SPA Editor Backlog
Team: DeveloperX

 Description   

This is a follow ticket of PAGES-843.

Annotation endpoint should also return missing template with error indicate, ex:

{
...
"/react-sample/main/00": "cms:component content=\"website:/react-sample/main/00\" activationStatus=\"0\" label=\"\" error=\"The template react-lm:components/title is missing\"",
"/react-sample/main/0/nestedArea": "cms:area content=\"website:/react-sample/main/0/nestedArea\" name=\"nestedArea\" availableComponents=\"\" type=\"list\" label=\"NestedArea\" inherit=\"false\" optional=\"false\" createdAreaNode=\"true\" showAddButton=\"true\" showNewComponentArea=\"true\" activationStatus=\"0\" label=\"nestedArea\" error=\"The template nestedArea is missing\"",
...
} 

 

Note: Need a design to show in Editor.



 Comments   
Comment by Phong Le Quoc [ 05/Oct/22 ]

This is a design sample

Missing components/areas can still be moved, deleted, copied/duplicated. Of course, they should not be modified.

Comment by Phong Le Quoc [ 05/Oct/22 ]

Sample code:
https://git.magnolia-cms.com/projects/MODULES/repos/pages/browse?at=refs%2Fheads%2FPAGE-843_experiment
https://git.magnolia-cms.com/projects/PLATFORM/repos/main/browse?at=refs%2Fheads%2FPAGES-843_experiment

 

Comment by Phong Le Quoc [ 13/Jul/23 ]
  • With PAGES-843, if a template is missing, an empty string will be returned. In case of a missing template of component-with-area  , we cannot do anything with the component as well as its children.
Comment by Phong Le Quoc [ 13/Jul/23 ]
  • Have all components
  • Current missing template
  • Missing template proposal
Comment by Phong Le Quoc [ 13/Jul/23 ]

Draft PRs

https://git.magnolia-cms.com/projects/PLATFORM/repos/main/pull-requests/1317/overview

https://git.magnolia-cms.com/projects/MODULES/repos/pages/pull-requests/595/overview

 

 

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