This is an automated email from the ASF dual-hosted git repository. jleroux 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 fc865c4 Fixed: One page checkout is broken because of ordermgr::getAssociatedStateList (OFBIZ-11838) fc865c4 is described below commit fc865c458a16a681183c25297d0f395027a36625 Author: Jacques Le Roux <jacques.le.r...@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 <@ofbizUrl>changeOrderStatus/orderview</@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 8ec97bb..6359edf 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({