[LIVECOPY-325] Null pointer for non-internationalized sites 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: Low
Reporter: Richard Gange Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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 trying to push changes to a site which is not internationalized exceptions are thrown in the log. The changes still get pushed correctly but having the null pointer exception isn't ideal.

Reproduce

  • Set up a new site which relies only on the default fallback site definition.
  • Create a live copy.
  • Push changes.

Actual
A null pointer is thrown when trying to read the i18n configuration from the site definition.

2022-07-13 10:48:46,689 INFO  vecopy.actions.PropagateMasterContentChangesHelper: Checking if childNodes for: /home0 should be deleted
2022-07-13 10:48:46,734 ERROR info.magnolia.commands.MgnlCommand                : An error occurred while rewriting links for slave page due to:
java.lang.NullPointerException: null
	at info.magnolia.livecopy.actions.rewire.StandardRewirePageLinksHelper.rewriteLinksForNode(StandardRewirePageLinksHelper.java:95) ~[magnolia-livecopy-3.2.9-SNAPSHOT.jar:?]
	at info.magnolia.livecopy.actions.rewire.RewirePageLinksHelper.rewritePageLinks(RewirePageLinksHelper.java:59) ~[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:?]
	at info.magnolia.commands.MgnlCommand.executeSynchronized(MgnlCommand.java:80) ~[magnolia-core-6.2.21.jar:?]

Expected
We should check for null at this line.

Notes
This issue only occurs after I remove the lines for compatibility support. See LIVECOPY-324. My site is using mtk2 template definitions.

The feedback I get is that an internationalized site is required. There is no mention of it in the documentation. From a technical point of view the code still works without it. Maybe this could be replaced with a warning or doc update.


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