Fixed Deleting option group does not redirect back to option group list page

TickTackk

Well-known member
Affected version
2.1.8
In file src/XF/Admin/Controller/Option.php
PHP:
    public function actionGroupDelete(ParameterBag $params)
    {
        $group = $this->assertGroupExists($params['group_id']);
        if (!$group->canEdit())
        {
            return $this->noPermission();
        }

        /** @var \XF\ControllerPlugin\Delete $plugin */
        $plugin = $this->plugin('XF:Delete');
        return $plugin->actionDelete(
            $group,
            $this->buildLink('options/groups/delete', $group),
            $this->buildLink('options/groups/edit', $group),
            $this->buildLink('options/groups'),
            $group->title
        );
    }
should be
PHP:
    public function actionGroupDelete(ParameterBag $params)
    {
        $group = $this->assertGroupExists($params['group_id']);
        if (!$group->canEdit())
        {
            return $this->noPermission();
        }

        /** @var \XF\ControllerPlugin\Delete $plugin */
        $plugin = $this->plugin('XF:Delete');
        return $plugin->actionDelete(
            $group,
            $this->buildLink('options/groups/delete', $group),
            $this->buildLink('options/groups/edit', $group),
            $this->buildLink('options'),
            $group->title
        );
    }
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.1.10).

Change log:
Redirect back to the option group list after deleting an option group.
There may be a delay before changes are rolled out to the XenForo Community.
 
This was fixed prior to the out-of-band 2.1.9 release but we hadn't approved the pull request until just now so it had the wrong version number. As soon as I merged it, I modified the post to reflect the correct version but you must have seen it pre-edit insanely quickly!
 
Back
Top Bottom