Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

SS 2.4.4 and postgresql


Reply


2 Posts   1165 Views

Avatar
dompie

Community Member, 88 Posts

22 December 2010 at 11:59pm

Hi,

for the first time I have installed SilverStripe 2.4.4 with postgresql extension on Ubuntu 10 with PHP 5.3.2-1ubuntu4.5. After some initial troubles with postgresql extension, I ended at this error message:

[User Error] DataObject::buildSQL: Can't find data classes (classes linked to tables) for SiteConfig. Please ensure you run dev/build after creating a new DataObject.
POST /install.php

2532    public function buildSQL($filter = "", $sort = "", $limit = "", $join = "", $restrictClasses = true, $having = "") {
2533       / Cache the big hairy part of buildSQL
2534       if(!isset(self::$cache_buildSQL_query[$this->class])) {
2535          / Get the tables to join to
2536          $tableClasses = ClassInfo::dataClassesFor($this->class);
2537          if(!$tableClasses) {
2538             if(!ManifestBuilder::has_been_included()) {
2539                user_error("DataObjects have been requested before the manifest is loaded. Please ensure you are not querying the database in _config.php.", E_USER_ERROR);
2540             } else {
2541                user_error("DataObject::buildSQL: Can't find data classes (classes linked to tables) for $this->class. Please ensure you run dev/build after creating a new DataObject.", E_USER_ERROR);
2542             }
2543          }
2544
2545          $baseClass = array_shift($tableClasses);
2546
2547

It looks like SS is not able to populate the SiteConfig Table (because SiteConfig class is missing), although the table was created correctly (/dev/build?dont_populate=1 runs error free). The Class is present and accessible, but for some reason '$tableClasses = ClassInfo::dataClassesFor($this->class);' returns an empty array for class SiteConfig. Any ideas how to fix this?

Avatar
dompie

Community Member, 88 Posts

4 January 2011 at 10:58pm

Bump, any ideas?