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 2022/04/14 13:48:50 UTC
[ofbiz-plugins] branch release18.12 updated: Fixed: Solr requires application/x-www-form-urlencoded (OFBIZ-12600)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/release18.12 by this push:
new f627d97d1 Fixed: Solr requires application/x-www-form-urlencoded (OFBIZ-12600)
f627d97d1 is described below
commit f627d97d14e9bd5c3f9274cd9c9f3ad730a1709e
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Thu Apr 14 15:44:14 2022 +0200
Fixed: Solr requires application/x-www-form-urlencoded (OFBIZ-12600)
Solr plugin fires exception on create/update of a product.
1.) enable eca in solrconfig.properties: solr.eca.enabled=true
2.) enable all eca in eecas.xml
3.) start ofbiz
4.) update or create a product (go to product and save it)
the error is fired.
Thanks: Ingo Wolfmayr for report
Conflicts handled by hand
---
solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java b/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java
index e2ef276dc..3224ced38 100644
--- a/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java
+++ b/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java
@@ -78,7 +78,8 @@ public abstract class SolrProductSearch {
String solrIndexName = (String) context.get("indexName");
if (SolrUtil.isSolrEcaEnabled()) {
- // Debug.logVerbose("Solr: addToSolr: Running indexing for productId '" + productId + "'", module);
+ System.setProperty("SolrDispatchFilter", "runsAfterControlFilter");
+ // Debug.logVerbose("Solr: addToSolr: Running indexing for productId '" + productId + "'", MODULE);
try {
GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne();
Map<String, Object> dispatchContext = ProductUtil.getProductContent(product, dctx, context);
@@ -109,6 +110,7 @@ public abstract class SolrProductSearch {
Debug.logError(e, e.getMessage(), module);
result = ServiceUtil.returnError(e.toString());
}
+ System.clearProperty("SolrDispatchFilter");
} else {
final String statusMsg = "Solr ECA indexing disabled; skipping indexing for productId '" + productId + "'";
if (Debug.verboseOn()) Debug.logVerbose("Solr: addToSolr: " + statusMsg, module);