Skip to content
Snippets Groups Projects
Commit 304b4783 authored by Jürgen Haas's avatar Jürgen Haas
Browse files

Issue #3379118 by jurgenhaas, Alex Bukach: Cron requests are redirected when...

Issue #3379118 by jurgenhaas, Alex Bukach: Cron requests are redirected when DANSE Config, DANSE Form, DANSE Log, or DANSE User is enabled
parent 5082e11c
Branches
Tags 2.2.19
2 merge requests!16Issue #3443829 by rclemings: Missing fixes for issue 3425881 (UI changes),!9Issue #3379118: Cron requests are redirected when DANSE Config, DANSE Form, DANSE Log, or DANSE User is enabled
......@@ -62,6 +62,15 @@ final class EventView extends EntityViewBuilder {
* {@inheritdoc}
*/
public function build(array $build) {
/** @var \Drupal\Core\Routing\CurrentRouteMatch $currentRouteMatch */
$currentRouteMatch = \Drupal::service('current_route_match');
if ($currentRouteMatch->getRouteName() !== 'entity.danse_event.canonical') {
// This call to the build method is not called by the user who wants to
// view the event, so we should return the default from the parent, as
// this is most likely called by the event notification system which
// requires the event to be rendered.
return parent::build($build);
}
$session = $this->request->getSession();
/**
* @var \Drupal\danse\Entity\EventInterface $event
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment