From 944f8b6c9e8f25a9b08d620136f01625100b2fed Mon Sep 17 00:00:00 2001 From: ffalqui Date: Wed, 22 Jul 2026 11:21:54 +0200 Subject: [PATCH] ORI-124 - FIX: NPE on contentId during bundle installation when workflow plugin is enabled --- .../system/services/notifier/WorkflowNotifierManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contentworkflow-plugin/src/main/java/com/agiletec/plugins/jpcontentworkflow/aps/system/services/notifier/WorkflowNotifierManager.java b/contentworkflow-plugin/src/main/java/com/agiletec/plugins/jpcontentworkflow/aps/system/services/notifier/WorkflowNotifierManager.java index bb6e30234..5ca7cb65d 100644 --- a/contentworkflow-plugin/src/main/java/com/agiletec/plugins/jpcontentworkflow/aps/system/services/notifier/WorkflowNotifierManager.java +++ b/contentworkflow-plugin/src/main/java/com/agiletec/plugins/jpcontentworkflow/aps/system/services/notifier/WorkflowNotifierManager.java @@ -113,7 +113,10 @@ public void listenContentSaving(ProceedingJoinPoint pjp, Object content) { String contentId = currentContent.getId(); if (null != contentId) { Content previousContent = this.getContentManager().loadContent(contentId, false); - if (previousContent.getStatus().equals(currentContent.getStatus())) { + // previousContent is null when the content is being created with a caller-supplied id + // (e.g. a bundle install that preserves content ids): there is no prior work copy to + // compare against, so it IS a status change — keep notify = true rather than NPE. + if (previousContent != null && previousContent.getStatus().equals(currentContent.getStatus())) { notify = false; } }