Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Forum Module /

Discuss the Forum Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Forum won't install on SS 2.3.2


Reply


7 Posts   1594 Views

Avatar
klikhier

Community Member, 150 Posts

8 July 2009 at 8:11am

Have checked out latest stable SS 2.3.2 and forum module (rev 81248). When I run dev/build I get the following (see below). What's going wrong?

[User Error] Couldn't run query: SELECT "Member"."ClassName", "Member"."Created", "Member"."LastEdited", "Member"."FirstName", "Member"."Surname", "Member"."Email", "Member"."Password", "Member"."RememberLoginToken", "Member"."NumVisit", "Member"."LastVisited", "Member"."Bounced", "Member"."AutoLoginHash", "Member"."AutoLoginExpired", "Member"."PasswordEncryption", "Member"."Salt", "Member"."PasswordExpiry", "Member"."LockedOutUntil", "Member"."Locale", "Member"."ForumRank", "Member"."Occupation", "Member"."Company", "Member"."City", "Member"."Country", "Member"."Nickname", "Member"."FirstNamePublic", "Member"."SurnamePublic", "Member"."OccupationPublic", "Member"."CompanyPublic", "Member"."CityPublic", "Member"."CountryPublic", "Member"."EmailPublic", "Member"."LastViewed", "Member"."Signature", "Member"."AvatarID", "Member"."ID", CASE WHEN "Member"."ClassName" IS NOT NULL THEN "Member"."ClassName" ELSE 'Member' END AS "RecordClassName" FROM "Member" WHERE ("Member"."ID" = 1) ORDER BY "Surname", "FirstName" LIMIT 1 Unknown column 'Member.ForumRank' in 'field list'
GET /test/silverstripe/dev/build

Line 526 in /Users/Menno/Sites/test/silverstripe/sapphire/core/model/MySQLDatabase.php
Source

517    }
518    
519    function databaseError($msg, $errorLevel = E_USER_ERROR) {
520       // try to extract and format query
521       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
522          $formatter = new SQLFormatter();
523          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
524       }
525       
526       user_error($msg, $errorLevel);
527    }
528    
529    /**
530     * Return a boolean type-formatted string
531     *
532     * @param array $values Contains a tokenised list of info about this data type

Trace

* Couldn't run query: SELECT "Member"."ClassName", "Member"."Created", "Member"."LastEdited", "Member"."FirstName", "Member"."Surname", "Member"."Email", "Member"."Password", "Member"."RememberLoginToken", "Member"."NumVisit", "Member"."LastVisited", "Member"."Bounced", "Member"."AutoLoginHash", "Member"."AutoLoginExpired", "Member"."PasswordEncryption", "Member"."Salt", "Member"."PasswordExpiry", "Member"."LockedOutUntil", "Member"."Locale", "Member"."ForumRank", "Member"."Occupation", "Member"."Company", "Member"."City", "Member"."Country", "Member"."Nickname", "Member"."FirstNamePublic", "Member"."SurnamePublic", "Member"."OccupationPublic", "Member"."CompanyPublic", "Member"."CityPublic", "Member"."CountryPublic", "Member"."EmailPublic", "Member"."LastViewed", "Member"."Signature", "Member"."AvatarID", "Member"."ID", CASE WHEN "Member"."ClassName" IS NOT NULL THEN "Member"."ClassName" ELSE 'Member' END AS "RecordClassName" FROM "Member" WHERE ("Member"."ID" = 1) ORDER BY "Surname", "FirstName" LIMIT 1 Unknown column 'Member.ForumRank' in 'field list'
Line 526 of MySQLDatabase.php
* MySQLDatabase->databaseError(Couldn't run query: SELECT "Member"."ClassName", "Member"."Created", "Member"."LastEdited", "Member"."FirstName", "Member"."Surname", "Member"."Email", "Member"."Password", "Member"."RememberLoginToken", "Member"."NumVisit", "Member"."LastVisited", "Member"."Bounced", "Member"."AutoLoginHash", "Member"."AutoLoginExpired", "Member"."PasswordEncryption", "Member"."Salt", "Member"."PasswordExpiry", "Member"."LockedOutUntil", "Member"."Locale", "Member"."ForumRank", "Member"."Occupation", "Member"."Company", "Member"."City", "Member"."Country", "Member"."Nickname", "Member"."FirstNamePublic", "Member"."SurnamePublic", "Member"."OccupationPublic", "Member"."CompanyPublic", "Member"."CityPublic", "Member"."CountryPublic", "Member"."EmailPublic", "Member"."LastViewed", "Member"."Signature", "Member"."AvatarID", "Member"."ID", CASE WHEN "Member"."ClassName" IS NOT NULL THEN "Member"."ClassName" ELSE 'Member' END AS "RecordClassName" FROM "Member" WHERE ("Member"."ID" = 1) ORDER BY "Surname", "FirstName" LIMIT 1 | Unknown column 'Member.ForumRank' in 'field list',256)
Line 129 of MySQLDatabase.php
* MySQLDatabase->query(SELECT "Member"."ClassName", "Member"."Created", "Member"."LastEdited", "Member"."FirstName", "Member"."Surname", "Member"."Email", "Member"."Password", "Member"."RememberLoginToken", "Member"."NumVisit", "Member"."LastVisited", "Member"."Bounced", "Member"."AutoLoginHash", "Member"."AutoLoginExpired", "Member"."PasswordEncryption", "Member"."Salt", "Member"."PasswordExpiry", "Member"."LockedOutUntil", "Member"."Locale", "Member"."ForumRank", "Member"."Occupation", "Member"."Company", "Member"."City", "Member"."Country", "Member"."Nickname", "Member"."FirstNamePublic", "Member"."SurnamePublic", "Member"."OccupationPublic", "Member"."CompanyPublic", "Member"."CityPublic", "Member"."CountryPublic", "Member"."EmailPublic", "Member"."LastViewed", "Member"."Signature", "Member"."AvatarID", "Member"."ID", CASE WHEN "Member"."ClassName" IS NOT NULL THEN "Member"."ClassName" ELSE 'Member' END AS "RecordClassName" FROM "Member" WHERE ("Member"."ID" = 1) ORDER BY "Surname", "FirstName" LIMIT 1,256)
Line 118 of DB.php
* DB::query(SELECT "Member"."ClassName", "Member"."Created", "Member"."LastEdited", "Member"."FirstName", "Member"."Surname", "Member"."Email", "Member"."Password", "Member"."RememberLoginToken", "Member"."NumVisit", "Member"."LastVisited", "Member"."Bounced", "Member"."AutoLoginHash", "Member"."AutoLoginExpired", "Member"."PasswordEncryption", "Member"."Salt", "Member"."PasswordExpiry", "Member"."LockedOutUntil", "Member"."Locale", "Member"."ForumRank", "Member"."Occupation", "Member"."Company", "Member"."City", "Member"."Country", "Member"."Nickname", "Member"."FirstNamePublic", "Member"."SurnamePublic", "Member"."OccupationPublic", "Member"."CompanyPublic", "Member"."CityPublic", "Member"."CountryPublic", "Member"."EmailPublic", "Member"."LastViewed", "Member"."Signature", "Member"."AvatarID", "Member"."ID", CASE WHEN "Member"."ClassName" IS NOT NULL THEN "Member"."ClassName" ELSE 'Member' END AS "RecordClassName" FROM "Member" WHERE ("Member"."ID" = 1) ORDER BY "Surname", "FirstName" LIMIT 1)
Line 384 of SQLQuery.php
* SQLQuery->execute()
Line 2657 of DataObject.php
* DataObject->instance_get_one("Member"."ID" = 1,)
Line 2594 of DataObject.php
* DataObject::get_one(Member,"Member"."ID" = 1)
Line 421 of Member.php
* Member::currentUser()
Line 85 of Controller.php
* Controller->init()
Line 20 of DevelopmentAdmin.php
* DevelopmentAdmin->init()
Line 116 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 282 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 123 of Director.php
* Director::direct(/dev/build)
Line 122 of main.php

Avatar
Catchgraphics

Community Member, 12 Posts

9 July 2009 at 8:24am

Won't work for me either on SS 2.3.2 – when I put it in the root directory it crashes the whole website with this message:

Website Error
There has been an error

The website server has not been able to respond to your request.

Hope there is a work around?

Avatar
Willr

Forum Moderator, 5513 Posts

9 July 2009 at 6:50pm

Unknown column 'Member.ForumRank' in 'field list'

Have you ran a dev/build to ensure all the database tables and columns are created?.

@Catchgraphics turn on dev mode by adding Director::set_environment_type("dev"); to your mysite/_config so you will at least get a proper error page

Avatar
klikhier

Community Member, 150 Posts

9 July 2009 at 9:27pm

Well, that's exactly the point where thing fail. When I run a dev/build. If your question is if I ran dev/build before adding the forum module: that's a yes! I had a clean install of SS 2.3.2, ran dev/build, tried out the multilanguage stuff and all this worked fine. After adding the forum the error previously posted occured...

Avatar
Willr

Forum Moderator, 5513 Posts

9 July 2009 at 9:34pm

Is there a db entry 'ForumRank' in the forum/code/ForumRole.php

Avatar
klikhier

Community Member, 150 Posts

9 July 2009 at 9:48pm

Solved! I removed forum folder. Did a new svn co http://svn.silverstripe.com/open/modules/forum/trunk. Now I can run dev/build! Problem solved. It appears that I have a newer revision now?!

Avatar
Catchgraphics

Community Member, 12 Posts

10 July 2009 at 1:15pm

Thanks for that. I put the site into development mode and retried building the database and it all worked this time. I must have done something incorrectly last time!
Many thanks.