[LIVECOPY-324] Class cast exception when using 6.2 dialog configuration Created: 13/Jul/22  Updated: 26/Aug/22

Status: Open
Project: Live Copy
Component/s: None
Affects Version/s: 3.2.8
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File mtk-sites-example.png    
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: AuthorX Maintenance
Team: AuthorX

 Description   

When using live copy with pure 6.2 template configuration it's not possible to push master changes without throwing exceptions in the log.

Reproduce

  • Setup two sites using mtk2 and mtk templates.
  • Create a live copy of each site
  • Push master changes on each site to its slave.

Actual
The mtk2 based site will produce the following exception on each push:

2022-07-13 10:12:57,136 ERROR info.magnolia.commands.MgnlCommand                : An error occurred while rewriting links for slave page due to:
java.lang.ClassCastException: class info.magnolia.ui.dialog.ConfiguredFormDialogDefinition cannot be cast to class info.magnolia.ui.dialog.definition.DialogDefinition (info.magnolia.ui.dialog.ConfiguredFormDialogDefinition and info.magnolia.ui.dialog.definition.DialogDefinition are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @65ae095c)
	at info.magnolia.livecopy.actions.rewire.CompatibilityRewirePageLinksHelper.getDialogDefinition(CompatibilityRewirePageLinksHelper.java:429) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
	at info.magnolia.livecopy.actions.rewire.CompatibilityRewirePageLinksHelper.getComponentDialogFields(CompatibilityRewirePageLinksHelper.java:411) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
	at info.magnolia.livecopy.actions.rewire.CompatibilityRewirePageLinksHelper.rewriteLinksForNode(CompatibilityRewirePageLinksHelper.java:94) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
	at info.magnolia.livecopy.actions.rewire.RewirePageLinksHelper.rewritePageLinks(RewirePageLinksHelper.java:58) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
	at info.magnolia.livecopy.command.PropagateMasterContentChangesCommand.lambda$5(PropagateMasterContentChangesCommand.java:101) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
	at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
	at info.magnolia.livecopy.command.PropagateMasterContentChangesCommand.rewritePageLinks(PropagateMasterContentChangesCommand.java:99) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
	at info.magnolia.livecopy.command.PropagateMasterContentChangesCommand.execute(PropagateMasterContentChangesCommand.java:64) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]

Expected
Projects using latest configurations shouldn't be throwing exceptions

Notes
Live copy needs a refactoring of its rewiring package. Compatibility classes should be broken out to a separate module. OR there needs to be some configuration at the module level to turn off compatibility mode. Simply calling both isn't an ideal solution for new projects.
See RewirePageLinksHelper.java#58


Generated at Mon Feb 12 02:27:40 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.