Hi!

This seems just another weakness in the pgsql support in Drupal... when adding a new forum entry, it doesn't get added to the database tables forum and term_node correctly. So, new forum entries won't get listed beneath its forums/containers but actually do show up under admin/content/node.

Example:

1) all forums are empty, a new forum entry is posted, Drupal says [quote]Your Forum topic has been created.[/quote]

drupal5_mycr=# select * from node where nid=25;
 nid | vid | type  | title  | uid | status |  created   |  changed   | comment | promote | moderate | sticky
-----+-----+-------+--------+-----+--------+------------+------------+---------+---------+----------+--------
  25 |  27 | forum | Test 1 |   1 |      1 | 1197670166 | 1197670166 |       2 |       0 |        0 |      0
(1 row)

drupal5_mycr=# select * from term_data where tid='26';
 tid | vid |     name     |                      description                      | weight
-----+-----+--------------+-------------------------------------------------------+--------
  26 |   1 | Dies und Das | Allgemeine Diskussionen, die sonst nirgendswo passen. |     -5

2) table forum before and after the new forum entry:

drupal5_mycr=# select * from forum;
 nid | vid | tid
-----+-----+-----
(0 rows)

drupal5_mycr=# select * from forum;
 nid | vid | tid
-----+-----+-----
  25 |  27 |   0
(1 row)

3) table term_node after posting new forum entry:

drupal5_mycr=# select * from term_node;
 nid | tid
-----+-----
(0 rows)

4) comparing the database tables to an already successfully filled drupal installation, shows missing/wrong values in forum.tid and term_node.nid and term_node.tid.

5) Ok, when I now update the tables by hand like this:

drupal5_mycr=# update forum set tid=26 where nid=25;
UPDATE 1
drupal5_mycr=# insert into term_node (nid, tid) values (25,26);
INSERT 0 1
drupal5_mycr=# select * from forum;
 nid | vid | tid
-----+-----+-----
  25 |  27 |  26
(1 row)

drupal5_mycr=# select * from term_node;
 nid | tid
-----+-----
  25 |  26
(1 row)

...the forum entry successfully shows up in the forum as new posting.

I'm using Drupal 5.5 on Debian Etch with PostgreSQL 8.1.

Regards,
Ingo

Comments

ij’s picture

Ok, additional information:

After alternating the tables as described above, user are able to post new comments to existing (viewable) threads in the forum, but can't start a new thread on their own.

So this bug seems to be valid for new forum entries only.

ij’s picture

Title: Forum entries are not added to database tables (pgsql) » Forum entries are not added to database tables

Removing reference to pgsql in issue title, because the same happens with mysql backend.

mysql> select * from forum;
+-----+-----+-----+
| nid | vid | tid |
+-----+-----+-----+
|  25 |  27 |  26 |
|  26 |  28 |   0 |
|   3 |   3 |   0 |
|   4 |   4 |   0 |
|   5 |   5 |   0 |
+-----+-----+-----+
5 rows in set (0.00 sec)

Regards,
Ingo

ij’s picture

Some more infos about all activated modules...

PostgreSQL database:

drupal5_mycr=# select name from system where status=1;
     name
---------------
 statistics
 weather
 webfm
 watchdog
 update_status
 upload
 forum
 throttle
 block
 blog
 book
 captcha
 color
 comment
 contact
 filter
 guestbook
 help
 image_captcha
 imce
 locale
 menu
 newsblog
 node
 path
 poll
 profile
 search
 system
 taxonomy
 text_captcha
 user
 webfm_images
 phptemplate
 bluebreeze
(35 rows)

Basically the same database in mysql:

mysql>  select name from system where status=1;
+---------------+
| name          |
+---------------+
| phptemplate   |
| system        |
| block         |
| blog          |
| book          |
| captcha       |
| color         |
| comment       |
| filter        |
| forum         |
| guestbook     |
| help          |
| image_captcha |
| imce          |
| locale        |
| menu          |
| newsblog      |
| node          |
| path          |
| poll          |
| profile       |
| search        |
| statistics    |
| taxonomy      |
| text_captcha  |
| throttle      |
| tinymce       |
| update_status |
| upload        |
| user          |
| watchdog      |
| weather       |
| webfm         |
| webfm_images  |
| bluebreeze    |
| fckeditor     |
+---------------+
36 rows in set (0.00 sec)

Hope this helps...

Regards,
Ingo

ij’s picture

Status: Active » Closed (fixed)

I've found the problem:

When I had activated acl + content_access module, it didn't worked well due to pgsql problems, so I deactivated forum module in that process and reactivated it again.
This left the table vocabulary_node_types in an inconsistantly state:


drupal5_mycr=# select * from vocabulary_node_types;
vid | type
-----+------
2 | book
(1 row)

Via the webinterface this was visible by a content type forum under admin/content/taxonomy with an empty type instead of "Forum topic".

Solution:
Delete the vocabulary of Forums under admin/content/taxonomy and create a new vocabulary for Forum topic. Verify the database to just have one entry for that type:

drupal5_mycr=# select * from vocabulary_node_types;
 vid | type
-----+-------
   2 | book
   3 | forum
   4 | forum
(3 rows)

drupal5_mycr=# select * from vocabulary_node_types;
 vid | type
-----+-------
   2 | book
   3 | forum
(2 rows)

Now, posting a new forum topic is working again... *pheeew* :-)

Closing issue...

Regards,
Ingo