Skip to content

Commit

Permalink
#9453 Fix getting context for admin interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Jan 17, 2024
1 parent 190f0d0 commit 774e5ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/template/PKPTemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ public function display($template = null, $cache_id = null, $compile_id = null,
$context = $request->getContext();

$pageContext = [
'apiBaseUrl' => $dispatcher->url($request, PKPApplication::ROUTE_API, $context->getPath())
'apiBaseUrl' => $dispatcher->url($request, PKPApplication::ROUTE_API, $context?->getPath() ?: 'index')
];
$output .= 'pkp.context = ' . json_encode($pageContext) . ';';

Expand Down

0 comments on commit 774e5ff

Please sign in to comment.