-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
Milestone
Description
Steps to reproduce
- Create an Eventsubscriber with the function "onExtractMapping" for Pimcore\Bundle\GenericDataIndexBundle\Event\Document\ExtractMappingEvent::class
- Configure the subscriber in service.yaml
- Execute the "generic-data-index:update:index" command
The function "onExtractMapping" is never run through.
Reason
Wrong use of event class from "Asset-Namespace" in
generic-data-index-bundle/src/Service/SearchIndex/IndexService/IndexHandler/DocumentIndexHandler.php
Line 21 in 48dfc20
use Pimcore\Bundle\GenericDataIndexBundle\Event\Asset\ExtractMappingEvent; |
and thus also dispatching the wrong Event type here
generic-data-index-bundle/src/Service/SearchIndex/IndexService/IndexHandler/DocumentIndexHandler.php
Lines 89 to 90 in 48dfc20
$extractMappingEvent = new ExtractMappingEvent($customFields); | |
$this->eventDispatcher->dispatch($extractMappingEvent); |