1
David_Topping
"Could not insert forum post"

My site is located athttp://www.humbersideonline.com/modules/news/ and whenever users try to post in the forums (replies, topics, etc.), they get a 'Could not insert forum post' error on a page with the site's template around it. However, when they try to post TOPICS, they still show up on the 'Recent Topics' block, but with no 'Last Post' field (check the site). If you then go to that topic, it's completely blank; there is the typical table that is normally there for a post, put there is no content within it (not even a 'Poster' column). There are also no 'Reply' buttons below it as normal.

Please please help!

2
mvandam
Re: "Could not insert forum post"
  • 2003/9/16 0:29

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Just to keep these forums a little organized, here is a link to the original thread:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=11136&forum=7

Since it 'suddenly started happening', it really sounds like a database error as suggested in the above thread. Have you run 'check table <table_name>' and/or 'repair table <table_name>' for the relevant tables? You will need some way to access the database such as command-line MySQL or phpmyadmin or mysqlfront or something like that...

3
Catzwolf
Re: "Could not insert forum post"
  • 2003/9/16 1:17

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Just wondering about this, there seems to be a lot of posts and topics regarding this problem and I am wonder if this could be 'software' related?

Also, maybe we could add a link in admin to repair the table and save users time in the future?

4
mvandam
Re: "Could not insert forum post"
  • 2003/9/16 1:44

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Catz,

Good idea. I've only seen 2-3 cases of this, but maybe that is already common enough to warrant doing something about it. As far as I can tell, there is nothing inherently 'wrong' with how XOOPS interacts with the database to be causing this. I suspect certain versions of PHP/mysql on certain platforms have bugs which allow tables to become corrupted when things are not shut down correctly or when multiple users post simultaneously. This is just a guess. Personally I have had this problem not with XOOPS but with another script (phpwiki running under linux, MySQL 3.23, php 4.1.2), where a table suddenly is corrupted for no obvious reason.

We could add an admin link to 'check' and 'repair' the tables (probably ALL XOOPS tables, not just forums). But I've observed that 'repair table' can sometimes lose a significant amount of data (mysql command-line will tell you this ahead of time). In these situations you really need to go through *all* the e.g. forums tables and make sure everything is properly cross-referenced and delete data for partially lost records (e.g. if you have the post title but the 'text' is gone). I'm not sure an admin 'button' can be written sufficiently well that it does the right thing in the general case.

Anyone else who has had this issue, could you post a brief summary of the problem and your fix, and whether you lost any database records or experienced other symptoms after the fix? Anyone have any ideas *why* this sometimes happens?

Thanks!

5
David_Topping
Re: "Could not insert forum post"

Repairing the tables has done nothing, and I posted in that previous thread and didn't recieve any help, that's why I'm beginning this one.

I do appreciate all of your help so far.

6
Catzwolf
Re: "Could not insert forum post"
  • 2003/9/16 2:16

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

mvandam wrote:
Catz,

Good idea. I've only seen 2-3 cases of this, but maybe that is already common enough to warrant doing something about it. As far as I can tell, there is nothing inherently 'wrong' with how XOOPS interacts with the database to be causing this.


I agree just been looking throu the code just now and 'everything' seems to be as it should (Where have I heard that before lol).

Quote:

I suspect certain versions of PHP/mysql on certain platforms have bugs which allow tables to become corrupted when things are not shut down correctly or when multiple users post simultaneously. This is just a guess. Personally I have had this problem not with XOOPS but with another script (phpwiki running under linux, MySQL 3.23, php 4.1.2), where a table suddenly is corrupted for no obvious reason.


It just seems wierd that this is only happening to a few people?? I have yet to come across this myself (or any other part of Xoops) even with the updates I have performed on this module and I think this one could be a bit tricky in tracking down (Still looking thou).

Quote:

We could add an admin link to 'check' and 'repair' the tables (probably ALL XOOPS tables, not just forums). But I've observed that 'repair table' can sometimes lose a significant amount of data (mysql command-line will tell you this ahead of time). In these situations you really need to go through *all* the e.g. forums tables and make sure everything is properly cross-referenced and delete data for partially lost records (e.g. if you have the post title but the 'text' is gone). I'm not sure an admin 'button' can be written sufficiently well that it does the right thing in the general case.


I agree with you and on second thoughts it could make a bad situation even worse (As has happened to myself).

I will look into this and see what I can come up with anyway.

The poster of the orginal problem has reported that this has not fixed the problem, so maybe we should start looking at other area's on this one?

Quote:

Anyone else who has had this issue, could you post a brief summary of the problem and your fix, and whether you lost any database records or experienced other symptoms after the fix? Anyone have any ideas *why* this sometimes happens?

Thanks!


David: Could you post your php, MySQL and the forum post table and contents here for us to look at?

Cheers

7
David_Topping
Re: "Could not insert forum post"

Sorry, I don't understand the question...what 'php, mysql, and the forum post table' do you need to look at? Just check out humbersideonline.com for the 'forum post table', it's on the top of the front page. For the others, I'm not entirely sure what you mean.

Thanks again.

8
Catzwolf
Re: "Could not insert forum post"
  • 2003/9/16 2:54

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

David_Topping wrote:
Sorry, I don't understand the question...what 'php, mysql, and the forum post table' do you need to look at? Just check out humbersideonline.com for the 'forum post table', it's on the top of the front page. For the others, I'm not entirely sure what you mean.

Thanks again.


Your php and MySQL version info and email myself and Mvandam a dump of these database tables. You can do this via phpmyadmin.

xoops_bb_forums
xoops_bb_posts

9
mvandam
Re: "Could not insert forum post"
  • 2003/9/16 3:13

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Quote:

Repairing the tables has done nothing, and I posted in that previous thread and didn't recieve any help, that's why I'm beginning this one.

David, sorry, I guess I missed that in the last thread. You posted some other message from phpmyadmin which I did not understand because I've never seen it before.

If I run 'check table xoops_bb_posts' from MySQL command line or phpmyadmin, I get the following output:

Quote:

+-----------------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------------+-------+----------+----------+
| xoops2.xoops_bb_posts | check | status | OK |
+-----------------------+-------+----------+----------+


If there is a problem, I see something about how many rows are indexed and how many rows of data there are. If there's a problem, run the query 'repair table xoops_bb_posts' and then 'check table xoops_bb_posts' to see if it worked.

It could potentially be a problem with *ANY* of the newbb tables (xoops_bb_categories, xoops_forum_access, xoops_forum_mods, xoops_bb_forums, xoops_bb_posts, xoops_bb_posts_text, xoops_bb_topics, but it is probably one of the last three.

10
David_Topping
Re: "Could not insert forum post"

Just FYI I am running XOOPS2, and I just checked the tables and they all seem to be ok.

I just e-mailed catzwolf with all the data he asked for, if you let me know your e-mail I can send it to you too.

Login

Who's Online

141 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 141


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits