Browse Source

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 year ago
parent
commit
b9b733546e
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      Resolver/SectionResolver.php

+ 9
- 3
Resolver/SectionResolver.php View File

@@ -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;
}


Loading…
Cancel
Save