I already solved the problem, but it brings back a question about naming conventions:
I created a class named 'folder extends Page' with a nice folder icon in order to store some pages there that are not visible in the site directly (footer-content etc). And then I ran into the following error when accessing assets in the backend:
[User Error] Couldn't run query: SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`SiteTree`.`ID` = 1) AND (`File`.ClassName IN ('Folder')) ORDER BY Name LIMIT 1 Unknown column 'SiteTree.ID' in 'where clause'
GET /_s/admin/assets/
Line 401 in /Users/yurigoul/Sites/_s/sapphire/core/model/MySQLDatabase.php
Removing the folder-class and giving a dev/build removes the problem.
Here is my folder-class for those who are in doubt (and my file in ./mysite/code was called folder.php):
<?php
class folder extends Page {
static $db = array(
);
public static $has_one = array(
);
static $icon = "themes/annomedia/images/icons/folder";
}
class folder_Controller extends Page_Controller {
public function init() {
parent::init();
}
}
?>
Also my question is: what names should I not use, or what else did I do wrong?