This bug has been resolved.

Crash Reported on Campaign Deletion
March 24, 2011, 8:08 am

I received the following SQL Error after deleting a temporary campaign: Warning (512): SQL Error: 1054: Unknown column 'Player.name' in 'order clause' [CORE/cake/libs/model/datasources/dbo_source.php, line 525] Code | Context $sql = "SELECT `Player`.`id`, `Player`.`campaign_id`, `Player`.`characterName`, `Player`.`playerName`, `Player`.`isHero`, `Player`.`baseExperienceSpent`, `Player`.`blackDice`, `Player`.`silverDice`, `Player`.`goldDice`, `Player`.`conquestValue`, `Player`.`comments`, `Player`.`created`, `Player`.`modified` FROM `players` AS `Player` WHERE `Player`.`campaign_id` = (1095) ORDER BY `Player`.`name` ASC " $error = "1054: Unknown column 'Player.name' in 'order clause'" $out = null $out = null; if ($error) { trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING); DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 525 DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 201 DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 337 DboSource::fetchAssociated() - CORE/cake/libs/model/datasources/dbo_source.php, line 898 DboSource::queryAssociation() - CORE/cake/libs/model/datasources/dbo_source.php, line 759 DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 673 Model::find() - CORE/cake/libs/model/model.php, line 1961 Model::del() - CORE/cake/libs/model/model.php, line 1686 Model::delete() - CORE/cake/libs/model/model.php, line 1713 CampaignsController::delete() - APP/controllers/campaigns_controller.php, line 543 Object::dispatchMethod() - CORE/cake/libs/object.php, line 117 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194 [main] - APP/webroot/index.php, line 88 Query: SELECT `Player`.`id`, `Player`.`campaign_id`, `Player`.`characterName`, `Player`.`playerName`, `Player`.`isHero`, `Player`.`baseExperienceSpent`, `Player`.`blackDice`, `Player`.`silverDice`, `Player`.`goldDice`, `Player`.`conquestValue`, `Player`.`comments`, `Player`.`created`, `Player`.`modified` FROM `players` AS `Player` WHERE `Player`.`campaign_id` = (1095) ORDER BY `Player`.`name` ASC Warning (2): Invalid argument supplied for foreach() [CORE/cake/libs/model/datasources/dbo_source.php, line 915] Code | Context $resultSet = array( array( "Campaign" => array(), "AvatarUpgrade" => array(), "CampaignLog" => array(), "CampaignState" => array(), "City" => array(), "Chest" => array(), "Conquest" => array(), "Dungeon" => array(), "Encounter" => array(), "Lieutenant" => array() ) ) $merge = false $association = "Player" $model = Campaign Campaign::$name = "Campaign" Campaign::$hasMany = array Campaign::$belongsTo = array Campaign::$actsAs = array Campaign::$validate = array Campaign::$useDbConfig = "default" Campaign::$useTable = "campaigns" Campaign::$displayField = "name" Campaign::$id = "1095" Campaign::$data = array Campaign::$table = "campaigns" Campaign::$primaryKey = "id" Campaign::$_schema = array Campaign::$validationErrors = array Campaign::$tablePrefix = "" Campaign::$alias = "Campaign" Campaign::$tableToModel = array Campaign::$logTransactions = false Campaign::$transactional = false Campaign::$cacheQueries = false Campaign::$hasOne = array Campaign::$hasAndBelongsToMany = array Campaign::$Behaviors = BehaviorCollection object Campaign::$whitelist = array Campaign::$cacheSources = true Campaign::$findQueryType = "first" Campaign::$recursive = 1 Campaign::$order = NULL Campaign::$__exists = true Campaign::$__associationKeys = array Campaign::$__associations = array Campaign::$__backAssociation = array Campaign::$__insertID = NULL Campaign::$__numRows = NULL Campaign::$__affectedRows = NULL Campaign::$_findMethods = array Campaign::$_log = NULL Campaign::$User = User object Campaign::$CampaignPlot = CampaignPlot object Campaign::$Avatar = Avatar object Campaign::$AvatarUpgrade = AvatarUpgrade object Campaign::$CampaignLog = CampaignLog object Campaign::$CampaignState = CampaignState object Campaign::$City = City object Campaign::$Chest = Chest object Campaign::$Conquest = Conquest object Campaign::$Dungeon = Dungeon object Campaign::$Encounter = Encounter object Campaign::$Lieutenant = Lieutenant object Campaign::$Player = Player object Campaign::$PlotCard = PlotCard object Campaign::$Upgrade = Upgrade object Campaign::$WorldmapLocation = WorldmapLocation object Campaign::$Aco = Aco object $linkModel = Player Player::$name = "Player" Player::$belongsTo = array Player::$hasMany = array Player::$validate = array Player::$actsAs = array Player::$useDbConfig = "default" Player::$useTable = "players" Player::$displayField = "id" Player::$id = false Player::$data = array Player::$table = "players" Player::$primaryKey = "id" Player::$_schema = array Player::$validationErrors = array Player::$tablePrefix = "" Player::$alias = "Player" Player::$tableToModel = array Player::$logTransactions = false Player::$transactional = false Player::$cacheQueries = false Player::$hasOne = array Player::$hasAndBelongsToMany = array Player::$Behaviors = BehaviorCollection object Player::$whitelist = array Player::$cacheSources = true Player::$findQueryType = NULL Player::$recursive = -1 Player::$order = NULL Player::$__exists = NULL Player::$__associationKeys = array Player::$__associations = array Player::$__backAssociation = array Player::$__insertID = NULL Player::$__numRows = NULL Player::$__affectedRows = NULL Player::$_findMethods = array Player::$_log = NULL Player::$Campaign = Campaign object Player::$Conquest = Conquest object Player::$Skill = Skill object Player::$SecretTraining = SecretTraining object $value = array( "Campaign" => array( "user_id" => "893", "campaign_plot_id" => "2", "avatar_id" => "10", "id" => "1095" ), "AvatarUpgrade" => array(), "CampaignLog" => array(), "CampaignState" => array(), "City" => array(), "Chest" => array(), "Conquest" => array(), "Dungeon" => array(), "Encounter" => array(), "Lieutenant" => array() ) $i = 0 $count = 0 $merged = array( "Player" => array() ) $count = 0; $merged[$association] = array(); foreach ($merge as $j => $data) { DboSource::__mergeHasMany() - CORE/cake/libs/model/datasources/dbo_source.php, line 915 DboSource::queryAssociation() - CORE/cake/libs/model/datasources/dbo_source.php, line 781 DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 673 Model::find() - CORE/cake/libs/model/model.php, line 1961 Model::del() - CORE/cake/libs/model/model.php, line 1686 Model::delete() - CORE/cake/libs/model/model.php, line 1713 CampaignsController::delete() - APP/controllers/campaigns_controller.php, line 543 Object::dispatchMethod() - CORE/cake/libs/object.php, line 117 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194 [main] - APP/webroot/index.php, line 88 Warning (2): Cannot modify header information - headers already sent by (output started at /home2/descentc/public_html/cake/basics.php:111) [CORE/cake/libs/controller/controller.php, line 640] Code | Context $status = "Location: http://descentcampaigntracker.com/campaigns/index" header - [internal], line ?? Controller::header() - CORE/cake/libs/controller/controller.php, line 640 Controller::redirect() - CORE/cake/libs/controller/controller.php, line 621 CampaignsController::delete() - APP/controllers/campaigns_controller.php, line 548 Object::dispatchMethod() - CORE/cake/libs/object.php, line 117 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194 [main] - APP/webroot/index.php, line 88

Resolution: fixed. incorrectly referencing obsolete column.


Descent: Journeys in the Dark is ™ and © Fantasy Flight Publishing, Inc.
All rights reserved. Used with permission.
Descent Campaign Tracker is created and maintained by Steven Yackel. (BGG: spazard1)  Please report any bugs you encounter. 
Descent Campaign Tracker has been hosted by Steven Yackel until 2014 for free. Since 2014 BGG: ionas / www.ht-studios.com hosts it for free.