1
ntread
Forum install causes database error
  • 2007/7/23 8:29

  • ntread

  • Just popping in

  • Posts: 9

  • Since: 2007/7/20


I've just installed newbb 2.02 on a XOOPS installation, upgrading from version 1 (which worked fine)
The install seemed to go ok, but now when I try to create a category it simply says 'Database Error' and returns to the 'new category' page. I found a very similar entry to this already on the forums, with the main reply being 'upgrade to CBB3.xx, however the version of XOOPS being used doesn't support this, and i'd rather try and figure out why i'm getting this problem at this point, in case i've done any major damage!

When I try to view the forum, everything is there (all icons etc) except any categories/forums, the space is just blank. I've documented below the debug messages.
I'm new at using xoops, and i'm just trying to update a site for someone.
It might be as simple as wrong file permissions or something, but i've no idea.

Using php debug I got the following messages on the actual forum page.
Warning [PHP]: Invalid argument supplied for foreach() in file modules/newbb/index.php line 90
Warning 
[PHP]: Invalid argument supplied for foreach() in file modules/newbb/index.php line 124
Notice 
[PHP]: Undefined variablecategory_array in file modules/newbb/index.php line 158
Warning 
[PHP]: array_multisort() [function.array-multisort]: Argument #1 is expected to be an array or a sort flag in file modules/newbb/index.php line 158
Notice [PHP]: Undefined variablecategory_array in file modules/newbb/index.php line 160
Notice 
[PHP]: Undefined variabledisplay in file modules/newbb/index.php line 161


And on the forum admin menu page i got these messages.
Notice [PHP]: Undefined variablerow in file modules/newbb/class/report.php line 141
Notice 
[PHP]: Undefined variablerow in file modules/newbb/class/report.php line 141


Using MySQL Debug on the Forum admin page I get this:
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 
'00c3f4fd4382dc92061ef09f48c07784'
SELECT FROM xoops_users WHERE uid=2
SELECT 
FROM xoops_modules WHERE dirname 'newbb'
SELECT FROM xoops_config WHERE (conf_modid '3'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' OR gperm_groupid '4'))
SELECT FROM xoops_modules WHERE dirname 'xoopspoll'
SELECT COUNT(*) AS total FROM xoops_bb_topics
SELECT COUNT
(*) AS total FROM xoops_bb_posts
SELECT sum
(topic_viewsFROM xoops_bb_topics
SELECT COUNT
(*) as report_count FROM xoops_bb_report WHERE report_result 0
Error number
1146
Error message
Table 'xoops_community.xoops_bb_report' doesn't exist
SELECT COUNT(*) as report_count FROM xoops_bb_report WHERE report_result = 1
Error number: 1146
Error message: Table '
xoops_community.xoops_bb_report' doesn't exist
SELECT p
.*, t.post_text FROM xoops_bb_posts p LEFT JOIN xoops_bb_posts_text t ON p.post_id=t.post_id LEFT JOIN xoops_bb_topics tp ON tp.topic_id=p.topic_id WHERE p.approved='0'
Error number1054
Error message
Unknown column 'p.approved' in 'where clause'
SELECT t.* FROM xoops_bb_topics t LEFT JOIN xoops_bb_posts p ON p.topic_id=t.topic_id WHERE p.pid AND p.approved AND t.approved 0
Error number
1054
Error message
Unknown column 'p.approved' in 'where clause'


Hope someone can shed some light on this.
It may well be that I should just upgrade to CBB 1.16, but I just worry that i might have done something with this install that may effect any future install.

Info

XOOPS Version:2.0.13.2
Module Name/Version:newbb - 2.02
PHP Version: 5.0.5
MySQL Version: 4.1.20
Web Server Software (Apache/IIS/Other):Apache/2.2.2
Operating System:
Theme you are using:blue lagoon
Custom template: (Yes/No)
PHP Debug Messages: See above
MySQL Debug Messages: See above

Thanks,

Nick

2
cybersensei
Re: Forum install causes database error

Nick,

You can start be tracing this error

Quote:
Error number: 1146
Error message: Table 'xoops_community.xoops_bb_report' doesn't exist
SELECT COUNT(*) as report_count FROM xoops_bb_report WHERE report_result = 1


It appears you're missing the table [xoops_bb_report]. Go to your MySQL Administrator/PHPMyAdmin/etc. and see if the table exists. If it's not, uninstall the module. Turn on your Debug and try re-installing noting any errors you receive during the installation; then post back here.

This error would cause your invalid argument errors from your PHP Debug because the variable is NULL; so when the scripts try to display data that doesn't exist you're getting an error because the variable wasn't defined when looping through the recordset.

GL.

3
iHackCode
Re: Forum install causes database error

did you run the upgrade script in the update folder?

taken from the readme file.
Quote:
Update Scripts Along with the Package:
-- Newbb 1 to Newbb 2.0.2 ( newbb1_to_newbb2.php )
-- Newbb 2.0 RC1 to Newbb 2.0.2 ( newbb2rc1_to_newbb2.php )
-- Newbb 2.0 RC2 to Newbb 2.0.2 ( newbb2rc2_to_newbb2.php )
-- Newbb 2.0 RC3 to Newbb 2.0.2 ( newbb2rc3_to_newbb2.php )
-- Newbb Pro 1.03 to Newbb 2.0.2 ( newbbpro_to_newbb2.php
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
ntread
Re: Forum install causes database error
  • 2007/7/24 1:23

  • ntread

  • Just popping in

  • Posts: 9

  • Since: 2007/7/20


Quote:

Bandit-X wrote:
did you run the upgrade script in the update folder?

taken from the readme file.
[quote]Update Scripts Along with the Package:
-- Newbb 1 to Newbb 2.0.2 ( newbb1_to_newbb2.php )
-- Newbb 2.0 RC1 to Newbb 2.0.2 ( newbb2rc1_to_newbb2.php )
-- Newbb 2.0 RC2 to Newbb 2.0.2 ( newbb2rc2_to_newbb2.php )
-- Newbb 2.0 RC3 to Newbb 2.0.2 ( newbb2rc3_to_newbb2.php )
-- Newbb Pro 1.03 to Newbb 2.0.2 ( newbbpro_to_newbb2.php


haha, nope I didn't, and having now done so all is working fine! Thankyou!
My reason for not doing this in the first place was because I just did a fresh install, i.e got rid of the newbb folder from the modules directory and didn't think I was 'updating' so to speak, more just 'installing'.
Anyway, all is good, thanks Bandit-X and cybersensei (you were also spot on about the missing tables, which of course were created by the update script.
I'll get the knack of this xooping soon enough I hope.

Nick

5
ntread
Re: Forum install causes database error
  • 2007/7/24 3:01

  • ntread

  • Just popping in

  • Posts: 9

  • Since: 2007/7/20


A couple more things have cropped up.
The right hand blocks have disapeard from the forum. my main.php seems to have the relevant update -
[b]
MUST-DO: replace your /modules/system/admin/modulesadmin/main.php with the
-- [url=http://sourceforge.net/tracker/index.php?func=detail&aid=1052403&group_id=41586&atid=430842] Bugfix for block update[/url]
[/b]

but the blocks dont appear. Any clues?

And also, the last instruction in the forum update readme.txt is to update the newbb templates.
I'm not exactly sure what this means. I've accessed the Template Set Manager through the admin interface and can see that there is a big list of templates for each module (making up the XOOPS default template set) , including the forum module. The files are things like 'newbb_online.html' and 'newbb_index.html'. Do I need to do something with these?

The only thing that appears wrong with the forum update is that the drop down menu background colour is too light so it's difficult to read the text.

Thanks,

Nick

6
cybersensei
Re: Forum install causes database error

Try going to your Module Administrator. Find your NewBB update icon (should be on the right). Click it to update your module. Follow the on-screen instructions; then check your forum.

GL.

Login

Who's Online

180 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 180


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