[MGNLMIGRATION-217] Footer content is not correctly migrated, the footer is transformed into a component but it should be an area Created: 24/Jan/13  Updated: 26/Jun/15  Resolved: 24/Jan/13

Status: Closed
Project: Migration 4.4 to 4.5 (closed)
Component/s: Migration Task
Affects Version/s: None
Fix Version/s: 1.2.1

Type: Bug Priority: Critical
Reporter: Samuel Schmitt Assignee: Samuel Schmitt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File footer-config-4.4.png    
Issue Links:
causality
is causing MGNLSTK-1076 Add conditionList areas placeholders,... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

The task that transform the primary type (info.magnolia.migration.task.content.UpdateWebsitePrimaryTypeMigrationTask) change the primary type of a STK footer area into mgnl:component instead of mgnl:area.

Why? Because the logic that return the new type is doing the following:
If the "old type" is Content, then the "new type" is page.
If the "old type" is ContentNode, then the new type is Area only if the node has no template assigned to it,otherwise it's a component.

Check here info.magnolia.migration.task.content.UpdateWebsitePrimaryTypeMigrationTask.getNewType(Node).

Footer is a special case, it an area for the 4.4 world of Magnolia but is has a template. Now in 4.5 it is still an area but its transformation must be handled differently by the migration.

Todo

Update UpdateWebsiteMainContentMigrationTask and add a special treatment for the footer.
It must be an area and the template assigned must be removed.
Do it in this method because footer is a STK specific area.

The doc must also mention that, please update the page http://wiki.magnolia-cms.com/pages/viewpage.action?pageId=56363441#MigrationprocessVersionupto12-4TransformSTK-basedwebsites



 Comments   
Comment by Jan Haderka [ 24/Jan/13 ]
  • If you are not going to fill the extra info about params/exceptions then don't add them to generated javadoc at all, the empty info will be created when actually outpitting the javadoc anyway.
    +     * @param page
    +     * @throws RepositoryException
    +     * @throws PathNotFoundException
    
  • Please set your IDE to format the code properly. There's no reason to have each line of code indented differently
    +               Node node = page.getNode("footer");
    +               String type = MgnlNodeType.NT_AREA;
    +            node.setPrimaryType(type);
    +            reportSystem("Changing Node Type from "+node.getPrimaryNodeType().getName()+" to "+type+" for the following node: "+node.getPath());
    +               // Area has no template
    +               MetaDataUtil.getMetaData(node).removeProperty("mgnl:template");
    +            reportRequestUserAction("The node "+node.getPath()+" was identified as a STK footer area."
    +                                                       +"It has been transform into an area. Please double check that it is used as a STK footer area.");
    
Generated at Mon Feb 12 10:18:16 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.