[drupal-devel] [bug] Create forum topic not inserting in forum
joe
drupal-devel at drupal.org
Mon Mar 28 00:41:52 UTC 2005
Issue status update for http://drupal.org/node/19562
Project: Drupal
Version: cvs
Component: forum.module
Category: bug reports
Priority: normal
Assigned to: joe at www.joepilot.net
Reported by: joe at www.joepilot.net
Updated by: joe at www.joepilot.net
Status: active
This is a problem I've been trying to figure out for a while, but have
gotten almost nowhere. For starters, I am using PostgreSQL in case
that is an issue. In any case, when I create a forum topic using the
link in that forum, the tid is not recorded when the topic is created.
Thus, the topic is created with a tid of 0 and doesn't appear in any
forum. I fixed this issue by adding the following code to the top of
the "forum_validate" function.
if (!$node->nid) {
// new topic
$node->taxonomy[] = arg(3);
}
else {
$node->taxonomy = array($node->tid);
}
This takes care of adding topics to forums using the link on the forum
page. It is just a little hack for now and is not meant to fix the
core issue.
Unfortunately, the taxonomy selector is still not shown and if the user
selects "forum topic" from the "create content" menu, they may create a
forum topic that isn't in a forum. This may stem from a PostgreSQL
issue with the taxonomy module. This seems to be an issue with any
module that deals with it's own "private" taxonomy, as in the forum
module and the new image module.
joe at www.joepilot.net
More information about the drupal-devel
mailing list