2014-07-20, 11:07 AM
MyBB version: 1.8 Beta 2 (fresh install on localhost)
Apache: 2.4.9 (Win32)
PHP: 5.5.14
MySQL: 5.6.19
Browser: Firefox 30.0
Immediately after (default) installation, open:
yourwebsite.com/archive/index.php?forum-1.html
The result is:
Please check MYBB_ROOT/archive/index.php (line 299):
// L.E.: Without status='1' in 'where' conditions (line 299), it works fine:
The reason: 'status' column does not exist in the "_forums" table.
Check MYBB_ROOT/install/resources/mysql_db_inserts.php (line 35) - for MyBB 1.8 BETA 2
In MyBB 1.6.14, in the same file (MYBB_ROOT/install/resources/mysql_db_inserts.php), 'status' column is present after "allowtratings,":
So, the question is: it is needed to keep "status" column in "_forums" table or not?
If the answer is YES, then should be included in MYBB_ROOT/install/resources/mysql_db_inserts.php file, otherwise, as i mentioned before,
Apache: 2.4.9 (Win32)
PHP: 5.5.14
MySQL: 5.6.19
Browser: Firefox 30.0
Immediately after (default) installation, open:
yourwebsite.com/archive/index.php?forum-1.html
The result is:
SQL Error: 1054 - Unknown column 'status' in 'where clause'
Query: SELECT COUNT(fid) AS subforums FROM mybb_forums WHERE pid='1' AND status='1'
Please check MYBB_ROOT/archive/index.php (line 299):
$query = $db->simple_select("forums", "COUNT(fid) AS subforums", "pid='{$id}' AND status='1'");
// L.E.: Without status='1' in 'where' conditions (line 299), it works fine:
$query = $db->simple_select("forums", "COUNT(fid) AS subforums", "pid='{$id}'");
The reason: 'status' column does not exist in the "_forums" table.
Check MYBB_ROOT/install/resources/mysql_db_inserts.php (line 35) - for MyBB 1.8 BETA 2
$inserts[] = "INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowvideocode, allowpicons, allowtratings, usepostcounts, usethreadcounts, password, showinjump, modposts, modthreads, modattachments, style, overridestyle, rulestype, rulestitle, rules) VALUES (1, 'My Category', '', '', 'c', 0, '1', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, 0, 0, 0, '', '');";
$inserts[] = "INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowvideocode, allowpicons, allowtratings, usepostcounts, usethreadcounts, password, showinjump, modposts, modthreads, modattachments, style, overridestyle, rulestype, rulestitle, rules) VALUES (2, 'My Forum', '', '', 'f', 1, '1,2', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, 0, 0, 0, '', '');";
In MyBB 1.6.14, in the same file (MYBB_ROOT/install/resources/mysql_db_inserts.php), 'status' column is present after "allowtratings,":
$inserts[] = "INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowvideocode, allowpicons, allowtratings, status, usepostcounts, password, showinjump, modposts, modthreads, modattachments, style, overridestyle, rulestype, rulestitle, rules) VALUES (1, 'My Category', '', '', 'c', 0, '1', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, 0, 0, 0, '', '');";
$inserts[] = "INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowvideocode, allowpicons, allowtratings, status, usepostcounts, password, showinjump, modposts, modthreads, modattachments, style, overridestyle, rulestype, rulestitle, rules) VALUES (2, 'My Forum', '', '', 'f', 1, '1,2', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, 0, 0, 0, '', '');";
So, the question is: it is needed to keep "status" column in "_forums" table or not?
If the answer is YES, then should be included in MYBB_ROOT/install/resources/mysql_db_inserts.php file, otherwise, as i mentioned before,
AND status='1'
should be removed from 'where' conditions in MYBB_ROOT/archive/index.php file (line 299).