This is an automated email from the ASF dual-hosted git repository.
ashishvijaywargiya 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 39cc356dd1 Improved: Align survey template location resolution with
other widget/template loaders (#1730) (#1732)
39cc356dd1 is described below
commit 39cc356dd10a00a81ba182892b436688b9c26332
Author: Ashish Vijaywargiya <[email protected]>
AuthorDate: Tue Aug 25 17:25:36 2026 +0530
Improved: Align survey template location resolution with other
widget/template loaders (#1730) (#1732)
- SurveyWrapper currently resolves its template location on its own,
separately from the other widget/template loaders in the codebase
(screens, forms, grids, menus, themes).
- This change updates SurveyWrapper.render(String) to resolve its
template location the same way those other loaders already do, so
resolution is consistent across all loaders in the framework.
Thank you Krishna Uprit for the contribution.
(cherry picked from commit d20b0fd07e6387b5318f78d446458d3644a839ac)
Co-authored-by: Krishna Uprit <[email protected]>
Co-authored-by: Krishnauprit18 <[email protected]>
---
.../src/main/java/org/apache/ofbiz/content/survey/SurveyWrapper.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/applications/content/src/main/java/org/apache/ofbiz/content/survey/SurveyWrapper.java
b/applications/content/src/main/java/org/apache/ofbiz/content/survey/SurveyWrapper.java
index 314e095a9c..565b69827a 100644
---
a/applications/content/src/main/java/org/apache/ofbiz/content/survey/SurveyWrapper.java
+++
b/applications/content/src/main/java/org/apache/ofbiz/content/survey/SurveyWrapper.java
@@ -175,6 +175,11 @@ public class SurveyWrapper {
* @throws SurveyWrapperException
*/
public Writer render(String templatePath) throws SurveyWrapperException {
+ if
(UtilValidate.isUrlInStringAndDoesNotStartByComponentProtocol(templatePath)) {
+ String errMsg = "Problem getting the template for Survey from URL:
" + templatePath;
+ Debug.logError(errMsg, MODULE);
+ throw new IllegalArgumentException(errMsg);
+ }
URL templateUrl = null;
try {
templateUrl = FlexibleLocation.resolveLocation(templatePath);