Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-6831

[Aggregation] Deleting Taxonomy Entries can cause exception

    XMLWordPrintable

Details

    • Ibexa Commerce, Ibexa Content, Ibexa Experience
    • Yes

    Description

      Ibexa Experience 4.5.3 (SEARCH_ENGINE=solr).

      1. Add a taxonomy entry assignment field for the tags taxonomy to the article content type.
      2. Create two tags.
      3. Create an article and assign the created tags.
      4. Check in Solr that all tags are assigned
      (check [SOLR_DSN]/#/collection1/query?q=content_type_id_id:2)
      5. Delete one of the tags (deleted tag is still assigned to the article in Solr).
      6. Create a Content Query that will find the article created above and that uses \Ibexa\Contracts\Taxonomy\Search\Query\Aggregation\TaxonomyEntryIdAggregation and execute the query ( TaxonomyTestCommand.phpcan be used).

      Result:

       [ERROR] Exception : Taxonomy Entry with ID: '8' not found.                                                             
       [INFO] #0 /var/www/html/vendor/ibexa/taxonomy/src/lib/Service/TaxonomyService.php(65):
              Ibexa\Taxonomy\Exception\TaxonomyEntryNotFoundException::createWithId(8)
              #1 /var/www/html/vendor/ibexa/taxonomy/src/lib/Search/Aggregation/TaxonomyResultKeyMapper.php(37):
              Ibexa\Taxonomy\Service\TaxonomyService->loadEntryById(8)
              #2
              /var/www/html/vendor/ibexa/solr/src/lib/ResultExtractor/AggregationResultExtractor/TermAggregationResultExtractor.php(51
              ):
              Ibexa\Taxonomy\Search\Aggregation\TaxonomyResultKeyMapper->map(Object(Ibexa\Contracts\Taxonomy\Search\Query\Aggregation
              \TaxonomyEntryIdAggregation), Array, Array)
              #3
              /var/www/html/vendor/ibexa/solr/src/lib/ResultExtractor/AggregationResultExtractor/DispatcherAggregationResultExtractor.
              php(45):
              Ibexa\Solr\ResultExtractor\AggregationResultExtractor\TermAggregationResultExtractor->extract(Object(Ibexa\Contracts\Ta
              xonomy\Search\Query\Aggregation\TaxonomyEntryIdAggregation), Array, Object(stdClass))
              #4 /var/www/html/vendor/ibexa/solr/src/lib/ResultExtractor.php(129):
              Ibexa\Solr\ResultExtractor\AggregationResultExtractor\DispatcherAggregationResultExtractor->extract(Object(Ibexa\Contra
              cts\Taxonomy\Search\Query\Aggregation\TaxonomyEntryIdAggregation), Array, Object(stdClass))
              #5 /var/www/html/vendor/ibexa/solr/src/lib/ResultExtractor.php(63):
              Ibexa\Solr\ResultExtractor->extractAggregations(Object(stdClass), Array, Array)
              #6 /var/www/html/vendor/ibexa/solr/src/lib/Handler.php(153): Ibexa\Solr\ResultExtractor->extract(Object(stdClass),
              Array, Array, Array)
              #7 /var/www/html/var/cache/dev/ContainerXEWy9il/Handler_aa841ec.php(33):
              Ibexa\Solr\Handler->findContent(Object(Ibexa\Contracts\Core\Repository\Values\Content\Query), Array)
              #8 /var/www/html/var/cache/dev/ContainerXEWy9il/VersatileHandler_3037769.php(32):
              ContainerXEWy9il\Handler_aa841ec->findContent(Object(Ibexa\Contracts\Core\Repository\Values\Content\Query), Array)
              #9 /var/www/html/vendor/ibexa/core/src/lib/Repository/SearchService.php(179):
              ContainerXEWy9il\VersatileHandler_3037769->findContent(Object(Ibexa\Contracts\Core\Repository\Values\Content\Query),
              Array)
              #10 /var/www/html/vendor/ibexa/core/src/lib/Repository/SearchService.php(125):
              Ibexa\Core\Repository\SearchService->internalFindContentInfo(Object(Ibexa\Contracts\Core\Repository\Values\Content\Quer
              y), Array, true)
              #11 /var/www/html/var/cache/dev/ContainerXEWy9il/SearchService_aa8a70e.php(36):
              Ibexa\Core\Repository\SearchService->findContentInfo(Object(Ibexa\Contracts\Core\Repository\Values\Content\Query),
              Array, true)
              #12 /var/www/html/src/Command/TaxonomyTestCommand.php(41):
              ContainerXEWy9il\SearchService_aa8a70e->findContentInfo(Object(Ibexa\Contracts\Core\Repository\Values\Content\Query))
              #13 /var/www/html/vendor/symfony/console/Command/Command.php(298):
              App\Command\TaxonomyTestCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput),
              Object(Symfony\Component\Console\Output\ConsoleOutput))
              #14 /var/www/html/vendor/symfony/console/Application.php(1058):
              Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput),
              Object(Symfony\Component\Console\Output\ConsoleOutput))
              #15 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(96):
              Symfony\Component\Console\Application->doRunCommand(Object(App\Command\TaxonomyTestCommand),
              Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
              #16 /var/www/html/vendor/symfony/console/Application.php(301):
              Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(App\Command\TaxonomyTestCommand),
              Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
              #17 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(82):
              Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput),
              Object(Symfony\Component\Console\Output\ConsoleOutput))
              #18 /var/www/html/vendor/symfony/console/Application.php(171):
              Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput),
              Object(Symfony\Component\Console\Output\ConsoleOutput))
              #19 /var/www/html/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php(54):
              Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput),
              Object(Symfony\Component\Console\Output\ConsoleOutput))
              #20 /var/www/html/vendor/autoload_runtime.php(35):
              Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run()
              #21 /var/www/html/bin/console(11): require_once('/var/www/html/v...')
              #22 {main}
      

      Notes:

      • similar error happens when using Elasticsearch
      • error is gone after running php bin/console ibexa:reindex

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              thorsten.reiter@ibexa.co Thorsten Reiter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: