catch's patch in #314147-3: DX: Standardise taxonomy load/save/delete functions on objects that was committed on 2008-11-05 in #4 has an undesired side effect:

+++ modules/forum/forum.admin.inc	5 Nov 2008 00:57:54 -0000
@@ -79,12 +79,13 @@ function forum_form_submit($form, &$form
-  $status = taxonomy_save_term($form_state['values']);
+  $term = (object) $form_state['values'];
+  $status = taxonomy_term_save($term);

The D6 code used to set $form_state['values']['tid'] to the tid that was assigned to the newly created forum. taxonomy_save_term() still does this, but now only in $term rather than in $form_state.

This tid is an essential piece of information for any contrib module that form_alters the forum_form_forum/forum_form_container form at admin/structure/forum/add/forum and admin/structure/forum/add/container, like Forum Access.

FA needs to have a reasonable way to find the tid of the newly created forum or container. I propose to simply set $form_state['values']['tid'].

BTW, $form_state['values']['tid'] is also defined when a forum or container is updated. This is unchanged from D6.

CommentFileSizeAuthor
new-forum-tid.patch733 bytessalvis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

new-forum-tid.patch queued for re-testing.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

This should be commited because it's regression that does not allow contrib to work with forum on their creation

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

salvis’s picture

THANKS!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.