TickTackk
Well-known member
- Affected version
- 2.1.8 PL2
This is because when someone clicks on the "Delete" button it has the
_xfRedirect
param in the URL but when submitting the form, the _xfRedirect
is not available. So the simplest fix would be to make the actionDelete
in src/XF/Admin/Controller/Option.php
pass the _xfRedirect
to to the confirm URL:
PHP:
public function actionDelete(ParameterBag $params)
{
$option = $this->assertOptionExists($params['option_id']);
if (!$option->canEdit())
{
return $this->noPermission();
}
$returnUrl = $this->getDynamicRedirect(
$this->buildLink('options'), false
);
$confirmUrl = $this->buildLink('options/delete', $option, [
'_xfRedirect' => $returnUrl
]);
/** @var \XF\ControllerPlugin\Delete $plugin */
$plugin = $this->plugin('XF:Delete');
return $plugin->actionDelete(
$option,
$confirmUrl,
$this->buildLink('options/edit', $option),
$returnUrl,
$option->title
);
}
Last edited: