[MAGNOLIA-7735] Magnolia won't start if .yaml export files are put in 'bootstrap' directory Created: 04/Mar/20  Updated: 24/Nov/20  Resolved: 06/Oct/20

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.1.4
Fix Version/s: 6.2.4

Type: Improvement Priority: Major
Reporter: Christopher Zimmermann Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.5d
Original Estimate: Not Specified

Attachments: File website.react-website.yaml    
Issue Links:
Relates
relates to MAGNOLIA-6683 Offer YAML as alternative format for ... Closed
causality
is causing PAGES-296 M6 Pages app does not offer to export... Closed
is causing MAGNOLIA-7894 DOC: You can use yaml files in Webapp... Closed
relation
is related to MAGNOLIA-7579 Bootstrapping YAML files fails when t... Closed
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)
Documentation update required:
Yes
Date of First Response:
Epic Link: LD improvements
Sprint: HL & LD 12, HL & LD 13
Story Points: 3

 Description   

If .yaml files exported from Magnolia are put in a 'bootstrap' directory - such as '/apache-tomcat/webapps/magnoliaAuthor/WEB-INF/bootstrap/author' - then adminCentral is not reachable.

When you enter the url to log in (http://localhost:8080/magnoliaAuthor/.magnolia/admincentral), then you are instead forwarded to http://localhost:8080/magnoliaAuthor/.magnolia/installer which shows a tomcat 500 error message, with the first line of "java.lang.IllegalStateException: This implementation of ModuleManagerUI is only meant to be used at startup."

 

Checking the catalina output - you see a message like "

UUID already exists: bed25be3-378f-4f80-9140-a7302e045732)

java.lang.RuntimeException: Error importing /Users/cz/Documents/a-projects/testing/spa-editor-pd/work/apache-tomcat/webapps/magnoliaAuthor/WEB-INF/bootstrap/common/category.tour-types.yaml: A node with this UUID already exists: bed25be3-378f-4f80-9140-a7302e045732"

But it is incorrect - that ID does not exist already.


Rather than causing Magnolia not to start, exported yaml files should be imported into JCR just as an exported xml file is.



 Comments   
Comment by Bartosz Staryga [ 16/Jun/20 ]

Double checked, and also I am having this problem.
I kept getting error saying:

/Users/bartoszstaryga/Downloads/website-spa-demo-master@a59c2f562d8/magnolia/apache-tomcat/webapps/magnoliaPublic/WEB-INF/bootstrap/common/website.react-website.yaml: A node with this UUID already exists: b1ba3644-434a-40e7-9bb1-0d96060eeb87

java.lang.RuntimeException: Error importing /Users/bartoszstaryga/Downloads/website-spa-demo-master@a59c2f562d8/magnolia/apache-tomcat/webapps/magnoliaPublic/WEB-INF/bootstrap/common/website.react-website.yaml: A node with this UUID already exists: b1ba3644-434a-40e7-9bb1-0d96060eeb87

We used this commit: https://git.magnolia-cms.com/projects/DEMOS/repos/website-spa-demo/commits/a59c2f562d86471cb149f45e7d329e71d580cb42
And followed steps from it's Readme to reproduce.

Comment by Christopher Zimmermann [ 27/Aug/20 ]

Verify that YAML files also work correctly when using the Content Importer

Comment by Robert Šiška [ 30/Sep/20 ]

Currently, bootstrapping from magnolia.boostrap.dir is triggered not only by WebappBootstrap task after all modules are installed, but also on installation of every module which registers some workspace (see SetupModuleRepositoriesTask#InitializeWorkspaceTask).

I don't see any reason why should it be bootstrapped on each module install, so I propose to remove InitializeWorkspaceTask from SetupModuleRepositoriesTask.

mdrapela Documentation update might be needed. First, it doesn't mention that you can use yaml files in Webapp-level bootstrap and IMHO it should mention that it triggers only after all modules are installed.

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