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:51 UTC
[ofbiz-plugins] branch release22.01 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 release22.01
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/release22.01 by this push:
new 2f2a448d7 Fixed: Solr requires application/x-www-form-urlencoded (OFBIZ-12600)
2f2a448d7 is described below
commit 2f2a448d713655e06c4c62f96c1ee72d3d6b3412
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
---
solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java | 2 ++
1 file changed, 2 insertions(+)
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 e1d1a45d3..be5c89067 100644
--- a/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java
+++ b/solr/src/main/java/org/apache/ofbiz/solr/SolrProductSearch.java
@@ -76,6 +76,7 @@ public abstract class SolrProductSearch {
String solrIndexName = (String) context.get("indexName");
if (SolrUtil.isSolrEcaEnabled()) {
+ 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();
@@ -98,6 +99,7 @@ public abstract class SolrProductSearch {
Debug.logError(gse, gse.getMessage(), MODULE);
result = ServiceUtil.returnError(gse.toString());
}
+ System.clearProperty("SolrDispatchFilter");
} else {
final String statusMsg = "Solr ECA indexing disabled; skipping indexing for productId '" + productId + "'";
if (Debug.verboseOn()) {