I am also having this same problem. Fresh install of 2.3.4 and the latest version of DataObjectManager from the modules page. I think this is an error with DataObjectManager as none of my files are listed in the trace, and there is no 'SortOrder' column in the database, which I'm assuming should have been created.
This is a strange error though becuase its not happening on another installation of SS 2.3.4 with the latest DataObjectManager I'm going to see if I can recreate the error.
Meanwhile here is the trace for my error.
Note: yes i have done dev/build several times with no results.
[User Error] Couldn't run query: SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.`ID` = 4) ORDER BY SortOrder ASC LIMIT 1 Unknown column 'SortOrder' in 'order clause'
GET /~danceafrica/admin/assets/
Line 401 in /home8/danceafrica/public_html/sapphire/core/model/MySQLDatabase.php
Source
392 }
393
394 function databaseError($msg, $errorLevel = E_USER_ERROR) {
395 // try to extract and format query
396 if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
397 $formatter = new SQLFormatter();
398 $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
399 }
400
401 user_error($msg, $errorLevel);
402 }
403 }
404
405 /**
406 * A result-set from a MySQL database.
407 * @package sapphire
Trace
* Couldn't run query: SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.`ID` = 4) ORDER BY SortOrder ASC LIMIT 1 Unknown column 'SortOrder' in 'order clause'
Line 401 of MySQLDatabase.php
* MySQLDatabase->databaseError(Couldn't run query: SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.`ID` = 4) ORDER BY SortOrder ASC LIMIT 1 | Unknown column 'SortOrder' in 'order clause',256)
Line 102 of MySQLDatabase.php
* MySQLDatabase->query(SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.`ID` = 4) ORDER BY SortOrder ASC LIMIT 1,256)
Line 120 of DB.php
* DB::query(SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.`ID` = 4) ORDER BY SortOrder ASC LIMIT 1)
Line 426 of SQLQuery.php
* SQLQuery->execute()
Line 2531 of DataObject.php
* DataObject->instance_get_one(`File`.`ID` = 4,)
Line 2468 of DataObject.php
* DataObject::get_one(File,`File`.`ID` = 4)
Line 2563 of DataObject.php
* DataObject::get_by_id(File,4)
Line 115 of Filesystem.php
* Filesystem::sync()
Line 109 of AssetAdmin.php
* AssetAdmin->index(HTTPRequest)
Line 159 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 119 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/admin/assets/)
Line 118 of main.php