1
mickbriz
newbb 2 database error
  • 2005/6/2 21:58

  • mickbriz

  • Not too shy to talk

  • Posts: 114

  • Since: 2005/3/26


When I try to create a new category I get an error message

"database error"

any ideas?

2
jdseymour
Re: newbb 2 database error

Have you recently upgraded the forum? What version are you using?

3
mickbriz
Re: newbb 2 database error
  • 2005/6/3 4:29

  • mickbriz

  • Not too shy to talk

  • Posts: 114

  • Since: 2005/3/26


Iam using version

Download = xoops_mod_cbb_1_13.zip

What it says on module when installed = Version: 1.12
Description: XOOPS Community Bulletin Board

xoops version = Powered by XOOPS 2.0.10

4
Coyoteold1
Re: newbb 2 database error
  • 2005/6/11 8:03

  • Coyoteold1

  • Just popping in

  • Posts: 9

  • Since: 2005/6/9 1


I'm having the same problem.

I installed the newbb 2 that came with XOOPs 2.0.10, and created a couple of categories.

I then installed CBB
(xoops_mod_cbb_1_13)

... as per the instructions included with the module, and everything seemed to happen with no errors.

I then tried to edit an existing category (which I'd already made before the upgrade), and got the "database error" (not very descriptive) message.

So, I tried to create a new category, to see if it was just a problem with updating existing ones, and got the same "database error" message.

I went in and turned on php error reporting, and got no errors when trying to update a category (but got several warnings about ksort reported when trying to view the actual forum pages - I doubt that those are related to this issue).

So, I turned on MySQL error reporting, and tried updating categories again... I got the following:

Quote:

SELECT * FROM xoops_config WHERE (conf_modid = 0 AND conf_catid = 1) ORDER BY conf_order ASC
SELECT sess_data FROM xoops_session WHERE sess_id = '0fc358e7bdd92703e1894a94921d1652'
SELECT * FROM xoops_users WHERE uid=1
SELECT * FROM xoops_modules WHERE dirname = 'newbb'
SELECT * FROM xoops_config WHERE (conf_modid = 5) ORDER BY conf_order ASC
SELECT * FROM xoops_group_permission WHERE (gperm_name = 'module_admin' AND gperm_modid = 1 AND (gperm_groupid = 1 OR gperm_groupid = 2))
SELECT * FROM xoops_bb_categories WHERE cat_id = 1
SELECT * FROM xoops_config WHERE (conf_modid = 0 AND conf_catid = 4) ORDER BY conf_order ASC

UPDATE xoops_bb_categories SET cat_image='blank.gif', cat_title='General Info', cat_description='', cat_order=1, cat_state=0, cat_url='', cat_showdescript= WHERE cat_id=1

Error number: 1064
Error message: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cat_id=1' at line 1

5
Coyoteold1
Re: newbb 2 database error
  • 2005/6/11 8:22

  • Coyoteold1

  • Just popping in

  • Posts: 9

  • Since: 2005/6/9 1


Okay... I went into the file:

admin_cat_manager.php in the module's admin directory, and found a line:

$fc->setVar('cat_showdescript', @$_POST['show']);

I changed it to the following to force it to have a value:

$fc->setVar('cat_showdescript', @$_POST['show']+0);

But then I got a _new_ error message:

Quote:
INSERT INTO xoops_bb_categories (cat_id, cat_image, cat_title, cat_description, cat_order, cat_state, cat_url, cat_showdescript) VALUES (0, 'blank.gif', 'test', '', 0, 0, 'https://xoops.org XOOPS', 1 )
Error number: 1054
Error message: Unknown column 'cat_image' in 'field list'


So, I looked in my database, and discovered that my "xoops_bb_categories" table only has three fields:

cat_id, cat_title, cat_order

I'm guessing there's a teensy problem with the install/update script for CBB.

So... I went digging in the sql directory, and grabbed out the description of the xoops_bb_categories field, and used it to recreate the table.

What creeps me out a little bit is that this involved dropping (erasing) the table, and making an empty one... but when I went into the category editing area, one of my existing categories was still there... but not the other one. Neither should have been. This I don't understand.

It _looks_ like this has fixed the problem for me. I'm hoping that I'm not going to keep running into little "speedbumps" like this throughout using CBB. CBB Looks like it's loaded with cool features, and I'm hoping to be able to use it.

Coyote

6
Coyoteold1
Re: newbb 2 database error (CBB actually)
  • 2005/6/11 8:29

  • Coyoteold1

  • Just popping in

  • Posts: 9

  • Since: 2005/6/9 1


Okay... apparently, there's several tables that simply did not update properly when CBB was installed. Apparently, I'll have to go in and fix them by hand.

Fortunately, I'm just testing here, and didn't have a real forum, so I'll just recreate the tables from scratch. I'm thinking that someone who was trying to upgrade an existing forum would end up being a little sad though.

Not sure what's causing this issue precisely. Dunno if CBB was expecting a different version of the newbb forums or what. I used the one that came with XOOPs... was that the wrong one?

I'm wondering if the read me for CBB simply wasn't fool-proof enough to prevent me from being a fool. : )

The thread here, by the way, should probably be "CBB Database error."

Coyote

7
Coyoteold1
Re: newbb 2 database error
  • 2005/6/11 8:44

  • Coyoteold1

  • Just popping in

  • Posts: 9

  • Since: 2005/6/9 1


Hmmm... fun fun... not sure if this is related, but when I went to turn off MySQL error reporting under system preferences...

It kept giving me a forum-related error, instead of turning off error reporting. It seems strange that it would be telling me about the forums when I'm on the system preferences page trying to turn off error reporting. : /

Anyway, it appears (so far) that recreating all the tables using the sql file included with CBB has worked. I haven't dug through every page or feature yet, but I'm pretty sure that even if I'm not XOOPs savvy enough to know precisely where the problem came from, it can be fixed.

Hope my fumblings here have helped someone else who had the same problems I was having. If anyone is aware of how to fix the actual problem, or of anything I might have done that will blow up someone's install, please share. : )

BTW: XOOPs-types... love the debugging options.

8
Coyoteold1
Re: newbb 2 database error
  • 2005/6/12 10:33

  • Coyoteold1

  • Just popping in

  • Posts: 9

  • Since: 2005/6/9 1


Ugh. The problem was that I was dumb. I had newbb 1, not 2. I needed to run the upgrade file.

newbb/update/newbb1_to_newbb2.php

Now I feel silly.

Coyote

Login

Who's Online

113 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 113


more...

Donat-O-Meter

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

Latest GitHub Commits