Magnolia 6.2.27 known issues
pom.xml
content editor version mismatch
High priority
Due to a malformed POM in dx-core
6.2.27, Magnolia refuses to start due to a mismatch with the content editor versions when upgrading any project overlaying dx-core
.
This will be remedied in 6.2.28. For now, you can use the workaround found below. |
Workaround instructions
In your project pom.xml
file:
-
Add the following to the
<properties>
section.<content.editor.version>1.3.11</content.editor.version>
-
Make sure then your project depends on that particular version in the
<dependencies>
section.<!-- Workaround for dx-core parent pom in 6.2.27 managing both 1.3.x and 2.1.x content-editor versions (webapp ends up with artifacts from both versions --> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-link-unfurl</artifactId> <version>${content.editor.version}</version> </dependency> <dependency> <groupId>info.magnolia.block</groupId> <artifactId>magnolia-block-api</artifactId> <version>${content.editor.version}</version> </dependency> <dependency> <groupId>info.magnolia.block</groupId> <artifactId>magnolia-block-templating</artifactId> <version>${content.editor.version}</version> </dependency> <dependency> <groupId>info.magnolia.editor</groupId> <artifactId>magnolia-content-editor</artifactId> <version>${content.editor.version}</version> </dependency> <dependency> <groupId>info.magnolia.editor</groupId> <artifactId>stories-app</artifactId> <version>${content.editor.version}</version> </dependency> <dependency> <groupId>info.magnolia.editor</groupId> <artifactId>magnolia-content-editor-widgetset</artifactId> <version>${content.editor.version}</version> </dependency>
Corrupted repository after restart
When using H2 version 2.1.x
on Java 17
, the repository can get corrupted upon shutdown.
18-Dec-2023 12:02:08.198 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [169049] milliseconds
2023-12-18 12:21:46,165 ERROR info.magnolia.cms.security.JCRSessionOp: Error caught while loading the system user anonymous: javax.jcr.PathNotFoundException: /system/anonymous
javax.jcr.PathNotFoundException: /system/anonymous
at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:576) ~[jackrabbit-core-2.20.13.jar:2.20.13]
A workaround for this issue is to update the version of H2:
-
Override the managed version in your BOM file.
-
Run the H2 migration script, as explained in Running the migration script.
H2 upgrades may require you to recreate the database
If you cannot start the instance after upgrading from version 1.4.x
to 2.x
, you must carry out the following procedure.
Running the migration script
Jackrabbit creates one H2 database per workspace, plus one for content versions in the |
Example JDBC URLs are listed below:
-
jdbc:h2:~/<magnolia.home>/repositories/magnolia/workspaces/website/db
-
jdbc:h2:~/<magnolia.home>/repositories/magnolia/workspaces/dam/db
-
jdbc:h2:~/<magnolia.home>/repositories/magnolia/version/db
For each of these databases:
-
Export your database into an SQL script using version
1.4.200
(or the earlier version you were using). -
Create a new database using version
2.1.214
. -
Run the SQL script to restore the database, using the file created with version
1.4.200
(or the earlier version that applies in your case).
#!/bin/bash
# h2-1.4.200.jar and h2-2.1.214.jar files must be present in the current working directory.
# They can be found respectively in 6.2.26 and 6.2.27 Magnolia webapps
path=/path/to/webapps/magnoliaAuthor/repositories/magnolia #repeat on public
for filepath in $(find $path -name '*.mv.db'); do
parentdir="$(dirname "$filepath")"
# Export data from old db file to backup.zip
echo "Exporting database $parentdir/db..."
java -cp h2-1.4.200.jar org.h2.tools.Script -url jdbc:h2:$parentdir/db -script $parentdir/backup.zip -options compression zip
rm -f $parentdir/db.mv.db
# Import data from the backup.zip to the new db file
echo "Importing data..."
java -cp h2-2.1.214.jar org.h2.tools.RunScript -url jdbc:h2:$parentdir/db -script $parentdir/backup.zip -options compression zip variable_binary
rm -f $parentdir/backup.zip
echo "$parentdir/db migrated succesfully"
done
For each of these databases:
-
Export your database into an SQL script using version
2.1.214
(or the earlier version you were using). -
Create a new database using version
2.3.232
. -
Run the SQL script to restore the database, using the file created with version
2.1.214
(or the earlier version that applies in your case).
#!/bin/bash
# h2-2.1.214.jar and h2-2.3.232.jar files must be present in the current working directory.
# They can be found respectively in 6.2.27 and 6.3 Magnolia webapps
path=/path/to/webapps/magnoliaAuthor/repositories/magnolia #repeat on public
for filepath in $(find $path -name '*.mv.db'); do
parentdir="$(dirname "$filepath")"
# Export data from old db file to backup.zip
echo "Exporting database $parentdir/db..."
java -cp h2-2.1.214.jar org.h2.tools.Script -url jdbc:h2:$parentdir/db -script $parentdir/backup.zip -options compression zip
rm -f $parentdir/db.mv.db
# Import data from the backup.zip to the new db file
echo "Importing data..."
java -cp h2-2.3.232.jar org.h2.tools.RunScript -url jdbc:h2:$parentdir/db -script $parentdir/backup.zip -options compression zip variable_binary
rm -f $parentdir/backup.zip
echo "$parentdir/db migrated succesfully"
done
If you are experiencing index-related errors while upgrading H2 databases, try running the script below to remove indexes before using the migration script.
|
See also:
-
The recommended way to upgrade from one version of the database engine to the next version is to create a backup of the database (in the form of a SQL script) using the old engine, and then execute the SQL script using the new engine.
-
MAGNOLIA-8638 Getting h2 error while upgrading 6.2.10 to latest version
analyticsView
type malfunctioning
In Magnolia 6.2.27, the $type: analyticsView
isn’t being recognized and is causing affected apps to fail on startup. You can see this by inspecting the logs.
While we work on fixing this for you, you can replace $type
with class
as shown below to ensure affected apps function as expected.
class: info.magnolia.analytics.ui.app.view.extension.AnalyticsViewDefinition (1)
1 | Where $type:analyticsView is, copy and paste this class: in its place. |
This issue only impacts Magnolia 6.2.27. |