From 3d7a69c4205b9ef6d0042889d72e0ff911f28c6f Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 31 May 2013 09:19:36 -0400
Subject: [PATCH] Attach Solr 3 error listener along with Solr 4 listener.

---
 .../VuFind/Search/Factory/AbstractSolrBackendFactory.php    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php
index 17158c88348..b115fba0290 100644
--- a/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php
+++ b/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php
@@ -31,6 +31,7 @@ namespace VuFind\Search\Factory;
 
 use VuFind\Search\Solr\InjectHighlightingListener;
 use VuFind\Search\Solr\MultiIndexListener;
+use VuFind\Search\Solr\V3\ErrorListener as LegacyErrorListener;
 use VuFind\Search\Solr\V4\ErrorListener;
 
 use VuFindSearch\Backend\BackendInterface;
@@ -184,7 +185,10 @@ abstract class AbstractSolrBackendFactory implements FactoryInterface
             $mindexListener->attach($events);
         }
 
-        // Error listener, use SOLR 4.x by default
+        // Attach error listeners for Solr 3.x and Solr 4.x (for backward
+        // compatibility with VuFind 1.x instances).
+        $legacyErrorListener = new LegacyErrorListener($backend);
+        $legacyErrorListener->attach($events);
         $errorListener = new ErrorListener($backend);
         $errorListener->attach($events);
     }
-- 
GitLab