Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Problems after 2.0.18.2 update

dodgeriddodgerid
edited January 2012 in Vanilla 2.0 - 2.8

Hi experiencing database query problems after update with users, role and registration details below

Users:
Fatal Error in Gdn_DatabaseDebug.Query();

Unknown column 'Name' in 'where clause'
select *
from GDN_Role Role
where Name = :Name
The error occurred on or near: /home/starpeac/public_html/library/database/class.database.php

276: 277: if (!is_object($PDOStatement)) { 278: trigger_error(ErrorMessage('PDO Statement failed to prepare', $this->ClassName, 'Query', $this->GetPDOErrorMessage($this->Connection()->errorInfo())), E_USER_ERROR); 279: } else if ($PDOStatement->execute($InputParameters) === FALSE) { 280: trigger_error(ErrorMessage($this->GetPDOErrorMessage($PDOStatement->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR); 281: } 282: } else { 283: $PDOStatement = $this->Connection()->query($Sql); 284: }
Backtrace:

/home/starpeac/public_html/library/database/class.database.phpPHP::Gdn_ErrorHandler(); [/home/starpeac/public_html/library/database/class.database.php:280] PHP::trigger_error(); [/home/starpeac/public_html/plugins/Debugger/class.databasedebug.php:105] Gdn_Database->Query(); [/home/starpeac/public_html/library/database/class.sqldriver.php:1650] Gdn_DatabaseDebug->Query(); [/home/starpeac/public_html/library/database/class.sqldriver.php:934] Gdn_SQLDriver->Query(); [/home/starpeac/public_html/applications/dashboard/models/class.usermodel.php:1157] Gdn_SQLDriver->GetWhere(); [/home/starpeac/public_html/applications/dashboard/controllers/class.usercontroller.php:89] UserModel->SearchCount(); [/home/starpeac/public_html/applications/dashboard/controllers/class.usercontroller.php:89] UserController->Index(); [/home/starpeac/public_html/library/core/class.dispatcher.php:322] PHP::call_user_func_array(); [/home/starpeac/public_html/index.php:53] Gdn_Dispatcher->Dispatch();
Queries:

select *
from GDN_User User
where UserID = '1'; 0.001311sselect *
from GDN_Permission Permission
limit 1; 0.004761sselect MAX(p.PermissionID) as PermissionID, MAX(p.Garden.Email.Manage) as Garden.Email.Manage, MAX(p.Garden.Settings.Manage) as Garden.Settings.Manage, MAX(p.Garden.Settings.View) as Garden.Settings.View, MAX(p.Garden.Routes.Manage) as Garden.Routes.Manage, MAX(p.Garden.Messages.Manage) as Garden.Messages.Manage, MAX(p.Garden.Applications.Manage) as Garden.Applications.Manage, MAX(p.Garden.Plugins.Manage) as Garden.Plugins.Manage, MAX(p.Garden.Themes.Manage) as Garden.Themes.Manage, MAX(p.Garden.SignIn.Allow) as Garden.SignIn.Allow, MAX(p.Garden.Registration.Manage) as Garden.Registration.Manage, MAX(p.Garden.Applicants.Manage) as Garden.Applicants.Manage, MAX(p.Garden.Roles.Manage) as Garden.Roles.Manage, MAX(p.Garden.Users.Add) as Garden.Users.Add, MAX(p.Garden.Users.Edit) as Garden.Users.Edit, MAX(p.Garden.Users.Delete) as Garden.Users.Delete, MAX(p.Garden.Users.Approve) as Garden.Users.Approve, MAX(p.Garden.Activity.Delete) as Garden.Activity.Delete, MAX(p.Garden.Activity.View) as Garden.Activity.View, MAX(p.Garden.Profiles.View) as Garden.Profiles.View, MAX(p.Garden.Profiles.Edit) as Garden.Profiles.Edit, MAX(p.Garden.Moderation.Manage) as Garden.Moderation.Manage, MAX(p.Garden.AdvancedNotifications.Allow) as Garden.AdvancedNotifications.Allow, MAX(p.Vanilla.Settings.Manage) as Vanilla.Settings.Manage, MAX(p.Vanilla.Categories.Manage) as Vanilla.Categories.Manage, MAX(p.Vanilla.Spam.Manage) as Vanilla.Spam.Manage, MAX(p.Vanilla.Discussions.View) as Vanilla.Discussions.View, MAX(p.Vanilla.Discussions.Add) as Vanilla.Discussions.Add, MAX(p.Vanilla.Discussions.Edit) as Vanilla.Discussions.Edit, MAX(p.Vanilla.Discussions.Announce) as Vanilla.Discussions.Announce, MAX(p.Vanilla.Discussions.Sink) as Vanilla.Discussions.Sink, MAX(p.Vanilla.Discussions.Close) as Vanilla.Discussions.Close, MAX(p.Vanilla.Discussions.Delete) as Vanilla.Discussions.Delete, MAX(p.Vanilla.Comments.Add) as Vanilla.Comments.Add, MAX(p.Vanilla.Comments.Edit) as Vanilla.Comments.Edit, MAX(p.Vanilla.Comments.Delete) as Vanilla.Comments.Delete, MAX(p.Plugins.WhosOnline.ViewHidden) as Plugins.WhosOnline.ViewHidden, MAX(p.Plugins.WhosOnline.Manage) as Plugins.WhosOnline.Manage, MAX(p.Conversations.Moderation.Manage) as Conversations.Moderation.Manage, MAX(p.Plugins.Flagging.Notify) as Plugins.Flagging.Notify, MAX(p.Plugins.kPoll.Manage) as Plugins.kPoll.Manage, MAX(p.Plugins.Debugger.View) as Plugins.Debugger.View, MAX(p.Plugins.Debugger.Manage) as Plugins.Debugger.Manage, MAX(p.Faq.Settings.Manage) as Faq.Settings.Manage, MAX(p.Faq.Questions.Edit) as Faq.Questions.Edit, MAX(p.Faq.Questions.Delete) as Faq.Questions.Delete, MAX(p.Faq.Questions.Browse) as Faq.Questions.Browse, MAX(p.Faq.Categories.Browse) as Faq.Categories.Browse, MAX(p.Faq.Categories.Edit) as Faq.Categories.Edit, MAX(p.Faq.Categories.Delete) as Faq.Categories.Delete, MAX(p.PollManager.Settings.Manage) as PollManager.Settings.Manage, MAX(p.PollManager.Manager.Manage) as PollManager.Manager.Manage, MAX(p.PollManager.Manager.Edit) as PollManager.Manager.Edit, MAX(p.PollManager.Manager.Delete) as PollManager.Manager.Delete, p.JunctionTable as JunctionTable, p.JunctionColumn as JunctionColumn, p.JunctionID as JunctionID
from GDN_Permission p
join GDN_UserRole ur on p.RoleID = ur.RoleID
where ur.UserID = '1'
group by p.JunctionTable, p.JunctionColumn, p.JunctionID; 0.000200sselect *
from GDN_Role Role
where Name = ''; 0.000217s
Variables in local scope:

[Sql] 'select *
from GDN_Role Role
where Name = :Name' [InputParameters] array (
':Name' => '',
) [Options] array (
'ReturnType' => 'DataSet',
) [ReturnType] 'DataSet' [PDOStatement] array (
'queryString' => 'select *
from GDN_Role Role
where Name = :Name',
)

Best Answers

  • dodgeriddodgerid
    Answer ✓

    Rather pleased with myself, pulled out the GDN_Role table and data from old backup, dropped existing table, run the copied Sql and hey presto, fully functioning site, ooh I am proud.

    You can close this now Mr Moderator, thanks.

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    Good stuff working through the issue. There is certainly not something that would have removed the role table in the update. Not sure what happened, but I'm glad you got things sorted.

Answers

  • Ok so after a little decifering and delving and comparisons to backup sql it looks as though the GDN_Role table has managed to lose all fields except session and its lost all data, hmm, I dont think this IS linked to the update, although god knows whats happened, was fine yesterday, will try fix

  • dodgeriddodgerid
    Answer ✓

    Rather pleased with myself, pulled out the GDN_Role table and data from old backup, dropped existing table, run the copied Sql and hey presto, fully functioning site, ooh I am proud.

    You can close this now Mr Moderator, thanks.

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    Good stuff working through the issue. There is certainly not something that would have removed the role table in the update. Not sure what happened, but I'm glad you got things sorted.

Sign In or Register to comment.