Solved Admin search might show link to unreachable option

This topic has been solved
K

Kirby

Guest
PHP:

Code:
public function actionView(ParameterBag $params)
{
    $option = $this->assertOptionExists($params['option_id']);
    $relation = $option->Relations->first();
    $group = $relation ? $relation->OptionGroup : null;

    return $this->redirect(
        $group ? $this->buildLink('options/groups', $group) . '#' . $option->option_id : $this->buildLink('options')
    );
}

If the option is shown in multiple groups and the first group belongs to an Add-on that is disabled only an error...

Read more

Continue reading...