Fixed Add-on debug options not listed in debug mode

Affected version
2.1.1

Xon

Well-known member
When debug/developer mode is enabled, the list of options for an add-on do not include options linked to a debug only group. This is inconsistent with how you can view debug-only options from the option group list.

The 'OptionGroup.debug_only' check should only be added if the site is not in debug mode;
PHP:
    public function getGroupsAndOptionsForAddOn($addOnId)
    {
        /** @var \XF\Mvc\Entity\ArrayCollection $relations */
        $relations = $this->finder('XF:OptionGroupRelation')
            ->with('Option', true)
            ->with('OptionGroup', true)
            ->where('Option.addon_id', $addOnId)
            ->where('OptionGroup.debug_only', 0)
            ->order(['OptionGroup.display_order', 'display_order', 'Option.option_id'])
            ->fetch();
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.2).

Change log:
Display debug only options if applicable when viewing an add-ons specific options list.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top