pimcore-lucene-search icon indicating copy to clipboard operation
pimcore-lucene-search copied to clipboard

Autocomplete 500 error

Open MustardOnPizza opened this issue 5 years ago • 2 comments

Q A
Bug report? yes

In Pimcore 6 I'm getting a 500 error when a request is made to /lucene-search I'm following the "frontend implementation" guide as written in this repositry but it doesn't work.

When I check the logs I get the following error:

[2019-08-30 14:24:10] php.INFO: User Deprecated: Auto-injection of the container for "LuceneSearchBundle\Controller\AutoCompleteController" is deprecated since Symfony 4.2. Configure it as a service instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Auto-injection of the container for \"LuceneSearchBundle\\Controller\\AutoCompleteController\" is deprecated since Symfony 4.2. Configure it as a service instead. at /var/www/html/pimcore/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php:64)"} []

[2019-08-30 14:24:10] php.INFO: User Deprecated: Calling the "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Calling the \"Symfony\\Component\\EventDispatcher\\EventDispatcherInterface::dispatch()\" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead. at /var/www/html/pimcore/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:148)"} []

[2019-08-30 14:24:10] doctrine.DEBUG: SELECT id,            (CASE WHEN expire IS NULL OR expire > ? THEN data ELSE NULL END) as data             FROM cache WHERE id IN (?) [1567139050,["system_cache_write_lock"]] []

[2019-08-30 14:24:10] doctrine.DEBUG: SELECT id,            (CASE WHEN expire IS NULL OR expire > ? THEN data ELSE NULL END) as data             FROM cache WHERE id IN (?) [1567139050,["system_cache_write_lock"]] []

[2019-08-30 14:24:10] php.CRITICAL: Argument 2 passed to LuceneSearchBundle\Helper\LuceneHelper::wildcardFindTerms() must be an instance of Zend_Search_Lucene_Interface, null given, called in /var/www/html/pimcore/vendor/dachcom-digital/lucene-search/src/LuceneSearchBundle/Controller/AutoCompleteController.php on line 20 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Argument 2 passed to LuceneSearchBundle\\Helper\\LuceneHelper::wildcardFindTerms() must be an instance of Zend_Search_Lucene_Interface, null given, called in /var/www/html/pimcore/vendor/dachcom-digital/lucene-search/src/LuceneSearchBundle/Controller/AutoCompleteController.php on line 20 at /var/www/html/pimcore/vendor/dachcom-digital/lucene-search/src/LuceneSearchBundle/Helper/LuceneHelper.php:46)"} []

To be brutally honest I'm not 100% sure what I'm reading here.

MustardOnPizza avatar Aug 30 '19 04:08 MustardOnPizza

@MustardOnPizza have you been able to solve this issue? I ran into the same problem :/

Edit: After some hours of debugging and testing I figured out it was related to a Pimcore issue. Disabling/enabling the plugin solved the issue.

eskju avatar Aug 03 '20 09:08 eskju

I ended up writing my own search from scratch hahaha

christoshrousis avatar Aug 03 '20 10:08 christoshrousis