Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
forum.module
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
15 May 2007 at 18:52 UTC
Updated:
18 Jun 2007 at 12:49 UTC
Jump to comment: Most recent file
Comments
Comment #1
Gurpartap Singh commentedMissed a variable in the fix in
hook_insert().Comment #2
Gurpartap Singh commentedThis one fixes the code, for errors seen when no forums have been defined.
Comment #3
Gurpartap Singh commentedSorry there was a variable typo.
Comment #4
Gurpartap Singh commentedlol and here's the patch.
Comment #5
Gurpartap Singh commentedFixed container problems(a fapi3 and form defaults bug).
Comment #6
dries commentedCare to explain the following blurbs?
1.
2.
Some explanation would help me, and others, review this patch. Thanks.
Comment #7
Gurpartap Singh commentedThat query was just rearranged, nothing great in that. For the tid, I'm not sure why in Drupal 6.x-dev, it doesn't assign $node->tid(it does so in Drupal 5.x). In other words, I don't know what else to do.
Comment #8
Gurpartap Singh commentedPatch needs update for the latest forum.module in HEAD.
Comment #9
Gurpartap Singh commentedhook_submit() is not being run when a forum topic node is submitted, for some fapi3 changes reason. That is why $node->tid(assigbed in forum_submit()) is not available in forum_insert().
Comment #10
eaton commentedAm I mistaken, or could this be done in a #submit handler on the form itself?
In looking over the FAPI3 changes, it appears that we did in fact drop hook_submit. Er. Oops. :-)
In looking closer, though, the refactoring of node.module's form handling means that it would be totally possible to put #submit = 'form_submit' into the form definition and have it work fine... unless I'm missing something. If that is not workable, we can go back in and look at reinstating the 'submit' hook and op.
Any thoughts?
Comment #11
eaton commentedThis also flushed out http://drupal.org/node/145390, a hitherto unnoticed FAPI3 bug in the node module. Whoops, and thanks! ;-)
Comment #12
Gurpartap Singh commentedForm submit handler would be better if it does all what hook_submit() has to provide.
And with that, submit handlers for node types are also broken, a patch for it's fix is here, by eaton: http://drupal.org/node/145390
Comment #13
Gurpartap Singh commentedThis is the latest patch for forum.module. And it looks like fapi needs another patch, of which eaton is taking care. Array data(altered) in the submit handler was not being passed into hook_insert(). after that this patch should be running the module smoothly.. in case there is nothing else left out.
Highlighted patch here: http://pastebin.mozilla.org/66839
Comment #14
Gurpartap Singh commentedhttp://drupal.org/node/145390#comment-246474 After this patch to node.module, the above patch works well. Please review :-)
Comment #15
Gurpartap Singh commentedWrong variable was put to check in
forum_get_forums(). Fixed in this patch. Please review..Comment #16
webchickSince forum module atm is largely completely useless with this patch, and since it seemed to solve all the bugs I could find without introducing new ones, marking RTBC (also raising severity level, we need forum module working to squeeze more features in this weekend :)).
Comment #17
webchickComment #18
Gurpartap Singh commentedThis one with very slight change. Removes title = ''; from theme_forum_display().
Comment #19
pwolanin commentedPatch code looks fine and forums work- +1
Comment #20
morphir commented+1
removes all errors I get.
Comment #21
dries commentedPatch no longer applies.
Comment #22
Gurpartap Singh commentedComment #23
dries commentedCommitted to CVS HEAD. Thanks Gurpartap. Keep rocking.
Comment #24
Gurpartap Singh commentedThere exists a function _forum_get_vid() which returns vocabulary ID from a variable, which if not set, then it finds directly from db and returns it. But forum module is currently directly using the vocabulary variable, than the proper function for this. This patch fixes it and hence closing the taxonomy module errors caused in forums.
Comment #25
Gurpartap Singh commentedThere was some more badness in forms, like validation handler was assigned which doesn't exist(and there's no need of it in that case). And fixed arguments in a submit handler for node form.
Comment #26
Gurpartap Singh commentedAlso in forum_submit, we needed to set form_state['values'] so that changed/assigned form values can be passed to hook_insert.
Comment #27
Gurpartap Singh commentedMarking back to fixed, as the some of the required changes have been done in this related patch: http://drupal.org/node/20295
Comment #28
(not verified) commented