Просмотр исходного кода

Erreur 500 : An exception has been thrown during the rendering of a template ("A new entity was found through the relationship 'App\Entity\Order\OrderShop#section' that was not configured to cascade persist operations for entity: Marché. To solve this iss #891

develop
Guillaume 1 год назад
Родитель
Сommit
b9b733546e
1 измененных файлов: 9 добавлений и 3 удалений
  1. +9
    -3
      Resolver/SectionResolver.php

+ 9
- 3
Resolver/SectionResolver.php Просмотреть файл

@@ -111,14 +111,20 @@ class SectionResolver
}
}

/*
* /!\ Cache désactivé car génération d'une erreur du type :
* "A new entity was found through the relationship 'App\Entity\Order\OrderShop#section' that was not configured to cascade persist operations for entity: Marché"
*
* Arrive sur les pages générées via le cache HTTP (CacheController.php)
*/
if ($sectionCurrent) {
$this->cacheSectionCurrent = $sectionCurrent;
//$this->cacheSectionCurrent = $sectionCurrent;
return $sectionCurrent;
} elseif ($returnVisitedIfOutOfSection && $currentVisitedSection) {
$this->cacheSectionVisited = $currentVisitedSection;
//$this->cacheSectionVisited = $currentVisitedSection;
return $currentVisitedSection;
} elseif ($returnDefaultIfOutOfSections && $sectionDefault) {
$this->cacheSectionDefault = $sectionDefault;
//$this->cacheSectionDefault = $sectionDefault;
return $sectionDefault;
}


Загрузка…
Отмена
Сохранить