You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2020/07/25 17:26:13 UTC
[ofbiz-framework] 01/02: Fixed: One page checkout is broken because
of ordermgr::getAssociatedStateList (OFBIZ-11838)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit 1662e5b42ef5ee36dc2aa68544615340056b68de
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Sat Jul 25 14:05:21 2020 +0200
Fixed: One page checkout is broken because of ordermgr::getAssociatedStateList (OFBIZ-11838)
On orderview screen at the ordermgr, when a user tries to change the status of
the order, in OrderInfo.ftl, we are calling "changeOrderStatus" request as
<@o...@ofbizUrl>
Hence when the request is done, it is rewriting URL to
https://localhost:8443/ordermgr/control/changeOrderStatus/orderview.
When js functions running in the backend like "getAssociatedStateList" are
called, they are getting the wrong URL to send a request to. This was causing
the issue.
For now, there are two different fixes that can handle both problems which are
mentioned in OFBIZ-2562 and OFBIZ-11838.
1.
To change the request mapping for "changeOrderStatus" and add request-redirect
to "orderview" screen. Change the actions in the forms in OrderInfo.ftl to
call "changeOrderStatus" request only and then remove code in
"getAssociatedStateList" js function to rewrite URL.
2.
To add .length to the existing URL rewrite code written in
"getAssociatedStateList" js function as
if (jQuery('#orderViewed').length) {
requestToSend = "/ordermgr/control/getAssociatedStateList"
}
Thanks: Pritam Kute!
I picked the 2nd solution
---
applications/commonext/webapp/ordermgr-js/geoAutoCompleter.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/applications/commonext/webapp/ordermgr-js/geoAutoCompleter.js b/applications/commonext/webapp/ordermgr-js/geoAutoCompleter.js
index c9ae960..95a55e4 100644
--- a/applications/commonext/webapp/ordermgr-js/geoAutoCompleter.js
+++ b/applications/commonext/webapp/ordermgr-js/geoAutoCompleter.js
@@ -81,7 +81,7 @@ function setKeyAsParameter(event, ui) {
function getAssociatedStateList(countryId, stateId, errorId, divId) {
var countryGeoId = jQuery("#" + countryId).val();
var requestToSend = "getAssociatedStateList";
- if (jQuery('#orderViewed')) {
+ if (jQuery('#orderViewed').length) {
requestToSend = "/ordermgr/control/getAssociatedStateList"
}
jQuery.ajax({