Skip to content

Commit

Permalink
fix error in backend
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyborn committed Feb 1, 2024
1 parent 5c39726 commit 8a28300
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Resources/contao/classes/OpenGraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ public static function addTagsToPage( $ref=null ): void {
Controller::loadDataContainer('opengraph_fields');
System::loadLanguageFile('opengraph_fields');

$request = System::getContainer()->get('request_stack')->getCurrentRequest();

if( $request && System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest($request) ) {
return;
}

$objPage = System::getContainer()->get('request_stack')->getCurrentRequest()->get('pageModel');

if( !($objPage instanceof PageModel) ){
Expand Down

0 comments on commit 8a28300

Please sign in to comment.