Jump to:

1036 Posts in 810 Topics by 315 members

Forum Module

SilverStripe Forums » Forum Module » Forum doesn't work with silverstripe 2.4

Discuss the Forum Module.

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

Page: 1
Go to End
Author Topic: 1221 Views
  • vancouverWill
    Avatar
    Community Member
    121 Posts

    Forum doesn't work with silverstripe 2.4 Link to this post

    [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"."FailedLoginCount", "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 /admin/security/

    Line 535 in C:\xampp\htdocs\xampp\silverstripe\social_network\sapphire\core\model\MySQLDatabase.php

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Forum doesn't work with silverstripe 2.4 Link to this post

    You'll need to be more specific if you want anyone to help.

    Where are you seeing this error?
    How can people duplicate this?
    How have you installed forum?

    I have just installed Forum 0.2.4 on SS 2.4a and without testing too much, all is fine and the ForumRank field that is causing the error above is present in my Database.

    Also remember 2.4 is alpha. It's not stable but I'm sure the devs will appreciate it if we find a bug here.

    Aaron

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Forum doesn't work with silverstripe 2.4 Link to this post

    Actually, all that information is provided in the error message (it provides the URL etc. as well). Did you run /dev/build after you installed 2.4/the forum module? Also, what version of the forum are you running?

  • vancouverWill
    Avatar
    Community Member
    121 Posts

    Re: Forum doesn't work with silverstripe 2.4 Link to this post

    Thanks for the quick replies.

    The only other modules I have installed are the registeration module and sharethis, I only have one really simple file in mysite/code/ which extends DataObjectDecorator { to expand the member table.

    I have forum-v0.2.4, SilverStripe-v2.4.0-alpha1 and figured maybe I was being helpful posting this as it is alpha version of SS. I'm not that worried that I can't use forum with this, I'll just go back to 2.3 for now. Having said that you are saying that you have it working fine with your setup so I'm not sure where it went wrong. I get the same error on every page including dev/build/.

    The complete error is

    [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"."FailedLoginCount", "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 /dev/build

    Line 535 in C:\xampp\htdocs\xampp\silverstripe\social_network\sapphire\core\model\MySQLDatabase.php
    Source

    526    }
    527    
    528    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    529       // try to extract and format query
    530       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    531          $formatter = new SQLFormatter();
    532          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    533       }
    534       
    535       user_error($msg, $errorLevel);
    536    }
    537    
    538    /**
    539     * Return a boolean type-formatted string
    540     *
    541     * @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"."FailedLoginCount", "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 535 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"."FailedLoginCount", "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 133 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"."FailedLoginCount", "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 135 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"."FailedLoginCount", "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 386 of SQLQuery.php
    * SQLQuery->execute()
    Line 2765 of DataObject.php
    * DataObject->instance_get_one("Member"."ID" = 1,)
    Line 2696 of DataObject.php
    * DataObject::get_one(Member,"Member"."ID" = 1)
    Line 457 of Member.php
    * Member::currentUser()
    Line 85 of Controller.php
    * Controller->init()
    Line 20 of DevelopmentAdmin.php
    * DevelopmentAdmin->init()
    Line 139 of Controller.php
    * Controller->handleRequest(SS_HTTPRequest)
    Line 282 of Director.php
    * Director::handleRequest(SS_HTTPRequest,Session)
    Line 127 of Director.php
    * Director::direct(/dev/build)
    Line 122 of main.php

    Thanks

    Will

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Forum doesn't work with silverstripe 2.4 Link to this post

    If the database is a new one and you're logged in I think the error could be that there is a DataObject::get('Member'): before the member table has been updated. Try creating a column in your database (via phpmyadmin or something) doesn't matter what type of field you create just name it 'ForumRank' then try site.com/dev/build.

  • vancouverWill
    Avatar
    Community Member
    121 Posts

    Re: Forum doesn't work with silverstripe 2.4 Link to this post

    Perfect. That did the trick.

    1221 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.