svn commit: r1747349 - in /ofbiz/trunk: applications/content/config/ContentErrorUiLabels.xml specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1747349 - in /ofbiz/trunk: applications/content/config/ContentErrorUiLabels.xml specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy

jleroux@apache.org
Author: jleroux
Date: Wed Jun  8 05:10:30 2016
New Revision: 1747349

URL: http://svn.apache.org/viewvc?rev=1747349&view=rev
Log:
A patch from Nameet Jain for "CMS throws error on clicking Find button" https://issues.apache.org/jira/browse/OFBIZ-7104

Steps to regenerate
1. Open the content app
2.  Click the CMS menu or use the link
       https://localhost:8443/content/control/CMSContentFind
3. Click on Find submenu or use link
      https://localhost:8443/content/control/AdminSearch

The 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;
 }