Hi there,

I installed the UIEforum according to the instructions and ran the update.php after that. The forum is now located at /forum. So far so good. However, when I add a new forum I get the following errors:


    * user warning: Unknown column 'TotalPostCount' in 'field list' query: UPDATE F_Forums SET TotalPostCount='1' WHERE ForumID=3 in /home/user/domains/sengerema.nl/public_html/base/includes/database.mysql.inc on line 120.
    * user warning: Unknown column 'TotalPostCount' in 'field list' query: UPDATE F_Forums SET TotalPostCount='1' WHERE ForumID=1 in /home/user/domains/sengerema.nl/public_html/base/includes/database.mysql.inc on line 120.
    * user warning: Unknown column 'TotalThreadCount' in 'field list' query: UPDATE F_Forums SET TotalThreadCount='1' WHERE ForumID=3 in /home/user/domains/sengerema.nl/public_html/base/includes/database.mysql.inc on line 120.
    * user warning: Unknown column 'TotalThreadCount' in 'field list' query: UPDATE F_Forums SET TotalThreadCount='1' WHERE ForumID=1 in /home/user/domains/sengerema.nl/public_html/base/includes/database.mysql.inc on line 120.

I checked both the created table and the install script /modules/uieforum/uieforum.install and neither contains the fields mentioned (TotalThreadCount, TotalPostCount). So I don't understand why the script would ask for a variable that was never created (and why no one else has reported this happening...)

Here, to complete my story, is the table-section from the install script:

db_query("CREATE TABLE F_Forums (
        ForumID int(12) NOT NULL auto_increment,
        ForumName varchar(255) NOT NULL default '',
        ParentForum int(12) default NULL,
        ForumDesc varchar(255) default '',
        weight tinyint(4) default '0',
        Locked enum('0','1') NOT NULL default '0',
        ThreadCount int(12) DEFAULT '0',
        PostCount int(12) DEFAULT '0',
        PRIMARY KEY  (ForumID),
        KEY ForumID (ForumID)
      ) TYPE=MyISAM;");

Thank you!

Harro

Comments

harro’s picture

In addition, checking the table F_Forum, I get the following error by PHPMyAdmin:

PRIMARY and INDEX keys should not both be set for column `ForumID`

This also seems to be something to fix in the installer?

Bye,

Harro

daniel.hunt’s picture

ALTER TABLE F_Forums ADD COLUMN TotalThreadCount int(12) NOT NULL DEFAULT 0;
ALTER TABLE F_Forums ADD COLUMN TotalPostCount int(12) NOT NULL DEFAULT 0;

ALTER TABLE F_Threads ADD COLUMN PostCount int(12) NOT NULL DEFAULT 0;
ALTER TABLE F_Threads ADD COLUMN ViewCount int(12) NOT NULL DEFAULT 0;

I'm thinking that this should fix things for you...

daniel.hunt’s picture

Assigned: Unassigned » daniel.hunt
Priority: Normal » Critical
Status: Active » Fixed

I'm committing some changes that will remove the update function from the .install file so taht all new users will have an installation that "just works"
Thanks for the report!

Daniel

Anonymous’s picture

Status: Fixed » Closed (fixed)