Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20413

"LanguageCode" criterion is not working for $repository->searchService.

    XMLWordPrintable

    Details

      Description

      Error message and stack trace:

      NotFoundException: Could not find 'Language' with identifier '0'
      
          in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Language\Cache.php line 97
          at Cache->getByLocale('0') in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler.php line 125
          at CachingHandler->loadByLanguageCode('0') in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator.php line 54
          at MaskGenerator->generateLanguageMask(array('esl-MX', 'always-available' => '0')) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Search\Gateway\CriterionHandler\LanguageCode.php line 73
          at LanguageCode->handle(object(CriteriaConverter), object(ezcQuerySelect), object(LanguageCode)) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Search\Gateway\CriteriaConverter.php line 54
          at CriteriaConverter->convertCriteria(object(ezcQuerySelect), object(LanguageCode)) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Search\Gateway\EzcDatabase.php line 142
          at EzcDatabase->getQueryCondition(object(LanguageCode), object(ezcQuerySelect), null) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Search\Gateway\EzcDatabase.php line 202
          at EzcDatabase->getResultCount(object(LanguageCode), array(), null) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Search\Gateway\EzcDatabase.php line 116
          at EzcDatabase->find(object(LanguageCode), '0', null, array(), null) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Search\Gateway\ExceptionConversion.php line 53
          at ExceptionConversion->find(object(LanguageCode), '0', null, array(), null) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Search\Handler.php line 103
          at Handler->findContent(object(Query), array()) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\Repository\SearchService.php line 79
          at SearchService->findContent(object(Query), array(), true) in E:\_EZ\GitHub\ezpublish5\vendor\ezsystems\ezpublish\eZ\Publish\Core\SignalSlot\SearchService.php line 65
          at SearchService->findContent(object(Query)) in E:\_EZ\GitHub\ezpublish5\src\EzSystems\AdminBundle\Controller\LanguageController.php line 40
          at LanguageController->listAction()
          at call_user_func_array(array(object(LanguageController), 'listAction'), array()) in E:\_EZ\GitHub\ezpublish5\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php line 129
          at HttpKernel->handleRaw(object(Request), '1') in E:\_EZ\GitHub\ezpublish5\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php line 73
          at HttpKernel->handle(object(Request), '1', true) in E:\_EZ\GitHub\ezpublish5\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel.php line 57
          at ContainerAwareHttpKernel->handle(object(Request), '1', true) in E:\_EZ\GitHub\ezpublish5\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php line 197
          at Kernel->handle(object(Request)) in E:\_EZ\GitHub\ezpublish5\web\index_dev.php line 14
      

      For me it looks like error is in generateLanguageMask function at
      \vendor\ezsystems\ezpublish\eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator.php:52

      Index of certain language (in our case it's "0" ) is sent to languageHandler->loadByLanguageCode(), when it should be value ( "eng-GB" for instance) instead.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            Anton.Petrushenkov@ez.no Anton Petrushenkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Time Spent - 3 hours Remaining Estimate - 2 hours, 15 minutes
                2h 15m
                Logged:
                Time Spent - 3 hours Remaining Estimate - 2 hours, 15 minutes
                3h