Skip to content

Commit

Permalink
Merge pull request #37 from oveleon/patch/bugfixes
Browse files Browse the repository at this point in the history
Fixes for Contao 5
  • Loading branch information
zoglo authored Mar 30, 2024
2 parents d377674 + a5fba6c commit 6fe43e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contao/dca/tl_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function checkPermission(): void
;

/** @var SessionInterface $objSession */
$objSession = System::getContainer()->get('session');
$objSession = System::getContainer()->get('request_stack')->getSession();

$session = $objSession->all();
$session['CURRENT']['IDS'] = array_intersect((array) $session['CURRENT']['IDS'], $objCes->fetchEach('id'));
Expand Down
4 changes: 3 additions & 1 deletion src/EventListener/GeneratePageListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Contao\PageModel;
use Contao\PageRegular;
use Contao\StringUtil;
use Contao\System;
use Oveleon\ContaoGlossaryBundle\Glossary;
use Oveleon\ContaoGlossaryBundle\Model\GlossaryItemModel;
use Oveleon\ContaoGlossaryBundle\Model\GlossaryModel;
Expand Down Expand Up @@ -139,7 +140,8 @@ public function __invoke(PageModel $pageModel, LayoutModel $layoutModel, PageReg
$objTemplate->language = $pageModel->rootLanguage;

// Disable glossary cache in contao debug mode
$objTemplate->cacheStatus = !Config::get('debugMode');
$blnDebug = System::getContainer()->getParameter('kernel.debug');
$objTemplate->cacheStatus = !$blnDebug;

$objTemplate->glossaryConfig = $glossaryConfig;

Expand Down

0 comments on commit 6fe43e3

Please sign in to comment.