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.
Comment | File | Size | Author |
---|---|---|---|
new-forum-tid.patch | 733 bytes | salvis | |
Comments
Comment #1
andypostnew-forum-tid.patch queued for re-testing.
Comment #2
andypostThis should be commited because it's regression that does not allow contrib to work with forum on their creation
Comment #3
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #4
salvisTHANKS!