[PAGES-333] Error when deleting a page Created: 28/Aug/20  Updated: 01/Jul/22  Resolved: 30/Aug/21

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

Type: Bug Priority: Neutral
Reporter: Monica Damborenea Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 1
Labels: VN-Implementation, maintenance, quickwin, ui-team-support
Remaining Estimate: 0d
Time Spent: 3.5d
Original Estimate: Not Specified

Attachments: HTML File delete page    
Issue Links:
Problem/Incident
Relates
causality
duplicate
is duplicated by PAGES-311 Exception is thrown when delete page Closed
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)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Migrate apps to new UI framework
Sprint: UI FW 35
Story Points: 5

 Description   

Deleting a page throws an error in the logs. The page gets deleted successfully but an error is thrown.

Steps to reproduce

1. Open the pages app

2. Select a page and click on "Delete page"

3. Check the logs, an error is thrown, find the full error attached.

2020-08-27 16:00:17,900 ERROR signment.MetaDataBasedTemplateDefinitionAssignment: Deleted content template is not correctly registered. info.magnolia.registry.RegistrationException: adminInterface:mgnlDeleted
...

 

Expected results

 No error should be thrown

Actual results

An error is thrown in MetaDataBasedTemplateDefinitionAssignment

Workaround

Create light module "admincentral" with a template called "deleted".

Development notes

https://git.magnolia-cms.com/projects/PLATFORM/repos/main.pub/browse/magnolia-rendering/src/main/java/info/magnolia/rendering/template/assignment/MetaDataBasedTemplateDefinitionAssignment.java#98



 Comments   
Comment by Jonathan Ayala [ 18/Mar/21 ]

The error comes from class info.magnolia.rendering.template.assignment.MetaDataBasedTemplateDefinitionAssignment. There is a explicit reference to the old template adminInterface:mgnlDeleted:

info.magnolia.rendering.template.assignment.MetaDataBasedTemplateDefinitionAssignment
...

65.       private static final String DELETED_PAGE_TEMPLATE = "adminInterface:mgnlDeleted";
...

137.      return Collections.singleton(templateDefinitionRegistry.getTemplateDefinition(DELETED_PAGE_TEMPLATE));

It must be changed to ui-admincentral:deleted.

Comment by Christopher Chard [ 19/Jul/21 ]

I am seeing this too and have the feeling that it makes deleting pages significantly slower

Comment by Roman Kovařík [ 30/Jul/21 ]

Possible solutions:

  • add adminCentral:deleted template to pages-app (the easiest solution, no update tasks)
  • introduce ~ pages-app:deleted, update tasks
  • do not use template for deleted page, make sure column, change template works with null template, show Deleted page for empty value (empty selection caption), remove deleted template with an update task (this solution was accepted by developers and estimated)
Generated at Mon Feb 12 06:17:55 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.