Skip to content

Commit

Permalink
fixed error with filter module redirect and esi tag fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Mar 18, 2019
1 parent bc4d649 commit 201113c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Form/FilterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function buildForm(FormBuilderInterface $builder, array $options)
// always add a hidden field with the filter id
$builder->add(static::FILTER_ID_NAME, HiddenType::class, ['attr' => ['value' => $this->config->getId()]]);

// always add a hidden field with the referrer url (required by reset for example to redirect back to user action page)
$builder->add(static::FILTER_REFERRER_NAME, HiddenType::class, ['attr' => ['value' => $request->getUri()]]);
// always add a hidden field with the referrer url (required by reset for example to redirect back to user action page) -> use request query string when in esi _ fragment sub-request
$builder->add(static::FILTER_REFERRER_NAME, HiddenType::class, ['attr' => ['value' => $request->query->has('request') ? ($request->getSchemeAndHttpHost() .'/' . $request->query->get('request')) : $request->getUri()]]);

$this->buildElements($builder, $options);
}
Expand Down

0 comments on commit 201113c

Please sign in to comment.