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

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

    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.

        Activity

        Anton Petrushenkov (Inactive) created issue -
        André Rømcke made changes -
        Field Original Value New Value
        Fix Version/s Engineering tracked issues [ 11179 ]
        André Rømcke made changes -
        Fix Version/s 5.0-SP [ 11287 ]
        André Rømcke made changes -
        Status Open [ 1 ] Backlog [ 10000 ]
        André Rømcke made changes -
        Affects Version/s 5.0 [ 10300 ]
        André Rømcke made changes -
        Component/s Search [ 10825 ]
        Damien Pobel (Inactive) made changes -
        Labels adminui
        Joao Inacio (Inactive) made changes -
        Fix Version/s Customer request [ 11018 ]
        Joao Inacio (Inactive) made changes -
        Component/s Repository & Services (Public API impl) [ 10309 ]
        Gunnstein Lye made changes -
        Status Backlog [ 10000 ] InputQ [ 10001 ]
        Gunnstein Lye made changes -
        Status InputQ [ 10001 ] Backlog [ 10000 ]
        Gunnstein Lye made changes -
        Status Backlog [ 10000 ] InputQ [ 10001 ]
        André Rømcke made changes -
        Status InputQ [ 10001 ] Backlog [ 10000 ]
        André Rømcke made changes -
        Status Backlog [ 10000 ] Development [ 3 ]
        Assignee André Rømcke [ andre.romcke@ez.no ]
        André Rømcke made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 30 minutes [ 1800 ]
        Worklog Id 29300 [ 29300 ]
        André Rømcke made changes -
        Status Development [ 3 ] Devlopment done [ 5 ]
        André Rømcke made changes -
        Status Devlopment done [ 5 ] Documentation done [ 10011 ]
        Marcos Loureiro (Inactive) made changes -
        Status Documentation done [ 10011 ] QA [ 10008 ]
        Assignee André Rømcke [ andre.romcke@ez.no ] Marcos Loureiro [ marcos.loureiro@ez.no ]
        Marcos Loureiro (Inactive) made changes -
        Time Spent 30 minutes [ 1800 ] 3 hours [ 10800 ]
        Worklog Id 29750 [ 29750 ]
        Marcos Loureiro (Inactive) made changes -
        Status QA [ 10008 ] QA done [ 10007 ]
        Marcos Loureiro (Inactive) made changes -
        Time Spent 3 hours [ 10800 ] 5 hours, 15 minutes [ 18900 ]
        Worklog Id 29779 [ 29779 ]
        Marcos Loureiro (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ] 2 hours, 15 minutes [ 8100 ]
        Time Spent 5 hours, 15 minutes [ 18900 ] 3 hours [ 10800 ]
        Worklog Id 29779 [ 29779 ]
        Worklog Time Spent 2 hours, 15 minutes [ 8100 ]
        André Rømcke made changes -
        Assignee Marcos Loureiro [ marcos.loureiro@ez.no ]
        Status QA done [ 10007 ] Closed [ 6 ]
        Fix Version/s 5.1 [ 11280 ]
        Resolution Fixed [ 1 ]
        André Rømcke made changes -
        Workflow eZ Engineering Scrumban Workflow [ 51845 ] EZ* Development Workflow [ 83502 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 83502 ] EZEE Development Workflow [ 122103 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            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