Author: jleroux
Date: Wed Jun 8 05:10:30 2016
New Revision: 1747349
URL:
http://svn.apache.org/viewvc?rev=1747349&view=revLog:
A patch from Nameet Jain for "CMS throws error on clicking Find button"
https://issues.apache.org/jira/browse/OFBIZ-7104Steps to regenerate
1. Open the content app
2. Click the CMS menu or use the link
https://localhost:8443/content/control/CMSContentFind3. Click on Find submenu or use link
https://localhost:8443/content/control/AdminSearchThe error is due to missing content index. We can improve the error message to guide user to index the content first. ContentErrorUiLabels.xml
jleroux: I just moved the label to be sorted right and added a French one
Modified:
ofbiz/trunk/applications/content/config/ContentErrorUiLabels.xml
ofbiz/trunk/specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy
Modified: ofbiz/trunk/applications/content/config/ContentErrorUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentErrorUiLabels.xml?rev=1747349&r1=1747348&r2=1747349&view=diff==============================================================================
--- ofbiz/trunk/applications/content/config/ContentErrorUiLabels.xml (original)
+++ ofbiz/trunk/applications/content/config/ContentErrorUiLabels.xml Wed Jun 8 05:10:30 2016
@@ -54,6 +54,10 @@
<value xml:lang="zh">ä½ æ²¡æ足å¤çæé ${updateMode} ç®å½ (éè¦CONTENTMGR_${updateMode} æ CONTENTMGR_ADMIN)ã</value>
<value xml:lang="zh-TW">æ¨æ²æè¶³å¤ çæ¬é ${updateMode} ç®é (éè¦CONTENTMGR_${updateMode} æ CONTENTMGR_ADMIN).</value>
</property>
+ <property key="ContentSearchNotIndexed">
+ <value xml:lang="en">Cannot find content search document. Please index all content.</value>
+ <value xml:lang="fr">Les contenus ne sont pas encore indexés, aucun résultat possible.</value>
+ </property>
<property key="dataEvents.error_call_create_service">
<value xml:lang="da">Fejl ved kald af service createDataResource</value>
<value xml:lang="de">Fehler beim Aufruf createDataResource Service</value>
Modified: ofbiz/trunk/specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy?rev=1747349&r1=1747348&r2=1747349&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy (original)
+++ ofbiz/trunk/specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy Wed Jun 8 05:10:30 2016
@@ -27,6 +27,7 @@ import org.ofbiz.content.search.SearchWo
import org.ofbiz.product.feature.ParametricSearch
import org.apache.lucene.search.*
import org.apache.lucene.index.DirectoryReader
+import org.ofbiz.base.util.UtilProperties;
queryLine = parameters.queryLine;
@@ -45,7 +46,7 @@ try {
searcher = new IndexSearcher(reader);
analyzer = new StandardAnalyzer();
} catch (java.io.FileNotFoundException e) {
- context.errorMessageList.add(e.getMessage());
+ context.errorMessageList.add(UtilProperties.getMessage("ContentErrorUiLabels", "ContentSearchNotIndexed", locale));
return;
}