Преглед на файлове

Erreur 500 : Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) #617

feature/symfony6.1
Guillaume Bourgeois преди 1 година
родител
ревизия
c087599f63
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. +4
    -2
      Controller/AbstractAdminController.php

+ 4
- 2
Controller/AbstractAdminController.php Целия файл

@@ -23,6 +23,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Event\AfterCrudActionEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\AfterEntityUpdatedEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeCrudActionEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityDeletedEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityUpdatedEvent;
use EasyCorp\Bundle\EasyAdminBundle\Exception\ForbiddenActionException;
use EasyCorp\Bundle\EasyAdminBundle\Exception\InsufficientEntityPermissionException;
use EasyCorp\Bundle\EasyAdminBundle\Factory\ControllerFactory;
@@ -281,14 +282,15 @@ abstract class AbstractAdminController extends EaAbstractCrudController
throw new InsufficientEntityPermissionException($context);
}

$event = new BeforeEntityDeletedEvent($entityInstance);
$event = new BeforeEntityUpdatedEvent($entityInstance);
$this->get('event_dispatcher')->dispatch($event);
$entityInstance = $event->getEntityInstance();

$entityInstance->setPosition($elm['position']);
$this->updateEntity($entityManager, $entityInstance);

$this->get('event_dispatcher')->dispatch(new AfterEntityUpdatedEvent($entityInstance));
// @TODO : ce dispatch déclenche UpdateProductfamilyAfterFlushEventSubscriber dans Caracole et on tombe sur une erreur "Maximum execution time"
//$this->get('event_dispatcher')->dispatch(new AfterEntityUpdatedEvent($entityInstance));
}

$url = $this->get(AdminUrlGenerator::class)

Loading…
Отказ
Запис