This is an automated email from the ASF dual-hosted git repository. nmalin pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new c5bd1bcf40 Fixed: Restore service sendNotification c5bd1bcf40 is described below commit c5bd1bcf4017041461943060d3c263a62943b5b5 Author: Nicolas Malin <nicolas.ma...@nereide.fr> AuthorDate: Tue Oct 15 10:33:24 2024 +0200 Fixed: Restore service sendNotification The service function had been moved to private, that break the service engine invocation. Restore it to public and synchronise the freemarker template creation with adding delegator and dispatcher to fix the url rendering system that need delegator --- .../main/java/org/apache/ofbiz/common/email/NotificationServices.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/email/NotificationServices.java b/framework/common/src/main/java/org/apache/ofbiz/common/email/NotificationServices.java index cd749a2dda..da3ac174ac 100644 --- a/framework/common/src/main/java/org/apache/ofbiz/common/email/NotificationServices.java +++ b/framework/common/src/main/java/org/apache/ofbiz/common/email/NotificationServices.java @@ -118,7 +118,7 @@ public class NotificationServices { * the sevice * @return A Map with the service response messages in it */ - private static Map<String, Object> sendNotification(DispatchContext ctx, Map<String, ? extends Object> context) { + public static Map<String, Object> sendNotification(DispatchContext ctx, Map<String, ? extends Object> context) { LocalDispatcher dispatcher = ctx.getDispatcher(); Locale locale = (Locale) context.get("locale"); Map<String, Object> result = null; @@ -193,6 +193,8 @@ public class NotificationServices { if (templateData == null) { templateData = new LinkedHashMap<>(); } + templateData.put("delegator", delegator); + templateData.put("dispatcher", ctx.getDispatcher()); try { // ensure the baseURl is defined