This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 6dbe684cf8 Fixed: Two regressions in the minilang-to-Groovy conversion
of ContentServicesScript.groovy (OFBIZ-13622)
6dbe684cf8 is described below
commit 6dbe684cf87f3144f1b4ffba707d986cf4a5252f
Author: Mridul Pathak <[email protected]>
AuthorDate: Tue Sep 29 19:25:11 2026 +0530
Fixed: Two regressions in the minilang-to-Groovy conversion of
ContentServicesScript.groovy (OFBIZ-13622)
Backported from trunk (#2145). Manually re-applied (not cherry-picked)
since this file's iterator-based structure has diverged from trunk's
closure-based one.
- createContentAlternativeUrl()'s new-alt-URL branch built objectInfo
without its leading slash, so ContentUrlFilter's inbound exact-match lookup
could never succeed for any content that didn't already have an alternative URL.
- The repair branch for an existing alt-URL stub had a stray apostrophe
instead of a hyphen separating the URI from the content ID.
---
.../org/apache/ofbiz/content/content/ContentServicesScript.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/applications/content/src/main/groovy/org/apache/ofbiz/content/content/ContentServicesScript.groovy
b/applications/content/src/main/groovy/org/apache/ofbiz/content/content/ContentServicesScript.groovy
index 08cdee9878..c29eb92b91 100644
---
a/applications/content/src/main/groovy/org/apache/ofbiz/content/content/ContentServicesScript.groovy
+++
b/applications/content/src/main/groovy/org/apache/ofbiz/content/content/ContentServicesScript.groovy
@@ -168,7 +168,7 @@ Map createContentAlternativeUrl() {
if (uri) {
try {
serviceResult = run service: 'updateDataResource',
with: [dataResourceId: contentAssocDataResources[0].dataResourceId,
- objectInfo:
"/${uri}'${content.contentId}-content"]
+ objectInfo:
"/${uri}-${content.contentId}-content"]
if (ServiceUtil.isSuccess(serviceResult)) {
contentIdTo = serviceResult.contentId
}
@@ -188,7 +188,7 @@ Map createContentAlternativeUrl() {
Map serviceResult = run service: 'createDataResource',
with: [dataResourceId: delegator.getNextSeqId('DataResource'),
dataResourceTypeId: 'URL_RESOURCE',
localeString: localeString.toString(),
-
objectInfo: "${uri}-${content.contentId}-content",
+
objectInfo: "/${uri}-${content.contentId}-content",
statusId: 'CTNT_IN_PROGRESS']
if (ServiceUtil.isSuccess(serviceResult)) {
dataResourceId = serviceResult.dataResourceId