Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-8812 now.

forum_options incorrectly cleared by includes/acp/acp_forums.php (action=edit) (fix completed in vcs)

In 3.0.6-RC3, when editing an existing forum in ACP, forum_options is being unconditionally set to 0, clearing any exclude/news feeds setting. Looks like latest in SVN has the same issue.

URL of the form:
Code: Select all
/adm/index.php?i=forums&sid=<sid>&icat=7&mode=manage&parent_id=1&f=2&action=edit


This is the problem section of code in acp_forums.php(acp_forums::main()):
Code: Select all
                                case 'edit':
                                        $forum_data = array(
                                                'forum_id'              =>      $forum_id
                                        );

                                // No break here

                                case 'add':

                                        $forum_data += array(
                                                'parent_id'                             => request_var('forum_parent_id', $this->parent_id),
                                                'forum_type'                    => request_var('forum_type', FORUM_POST),
                                                'type_action'                   => request_var('type_action', ''),
                                                'forum_status'                  => request_var('forum_status', ITEM_UNLOCKED),
                                                'forum_parents'                 => '',
                                                'forum_options'                 => 0,


I'm not entirely sure what the best fix is here - forum_options obviously does need to be set to a default value when adding a forum, but should really be omitted from the UPDATE, since it's not maintained by acp_forums.php. Possibly just add the following as a quick fix, and preferable to reading then writing it:
Code: Select all
if ($action == 'edit')
{
        unset($forum_data['forum_options']);
}

Alternatively, add booleans for the options to the forum form, but this causes extra hassle / inconsistency when mods also use forum_options.


And finally, S_FORUM_OPTIONS is not related to forum_options... naughty devs :-P

Comments / History

Edited ticket

Action performed by Paul.J.Murphy (QA Team) on Oct 24th 2009, 20:26

Edited ticket

Action performed by Paul.J.Murphy (QA Team) on Oct 24th 2009, 20:34

Edited ticket

Action performed by Paul.J.Murphy (QA Team) on Oct 24th 2009, 21:23

Changed ticket severity from "Uncategorised/normal" to "Severe"

Action performed by Acyd Burn (Server Manager) on Oct 25th 2009, 07:58

Linked ticket with changeset: r10233

Action performed by Acyd Burn (Server Manager) on Oct 25th 2009, 09:03

Assigned ticket to user "Acyd Burn"

Action performed by Acyd Burn (Server Manager) on Oct 25th 2009, 09:03

Changed ticket status from "New" to "Fix completed in SVN"

Action performed by Acyd Burn (Server Manager) on Oct 25th 2009, 09:03

Posted by Acyd Burn (Server Manager) on Oct 25th 2009, 09:04

Thanks for reporting this. :) Would have been quite a bummer to see 3.0.6 released with such a severe bug. :)

Posted by Paul.J.Murphy (QA Team) on Oct 25th 2009, 09:16

No problem, glad to be of assistance. :-)

Ticket details

Related SVN changesets