- Merge request !25Issue #3159875: MissingMandatoryParametersException with BEF Links and taxonomy/term/% β (Closed) created by podarok
HI. When setting up BEF for exposed sort displayed as LINKS, then getting this error and blank page:
Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("arg_0") to generate a URL for route
The problem can be solved by not using exposed sort as link or if I change one line BetterExposedFiltersWidgetBase.php getExposedFormActionUrl() function like this. But not sure if it is the right solution. Just temporary fix. Can someone provide a patch with correct solution, please?
protected function getExposedFormActionUrl(FormStateInterface $form_state) {
/** @var \Drupal\views\ViewExecutable $view */
$view = $form_state->get('view');
$display = $form_state->get('display');
//if (isset($display['display_options']['path'])) {
if (isset($display['display_options']['path']) && $display['display_options']['path'] != 'taxonomy/term/%' ) {
return Url::fromRoute(implode('.', [
'view',
$view->id(),
$display['id'],
]));
}
$request = \Drupal::request();
$url = Url::createFromRequest(clone $request);
$url->setAbsolute();
return $url;
}
Fixed
6.0
Code
The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.