dmolineus / cloud-api

Contao Cloud Api Extension which provides an api to access several cloud service
0 stars 1 forks source link

Installation fails (Database can't be updated) #8

Open m-vo opened 11 years ago

m-vo commented 11 years ago

I tried to install the 0.3.0.5014-beta in contao 3.1.4 via the composer client (contao-legacy/cloud-api). The database update can not be executed (not via composer client nor the install tool), cause a call to a non-existing table is made before:

Fatal error: Uncaught exception Exception with message Query error: Table 'xxx.tl_cloud_api' doesn't exist (SELECT * FROM tl_cloud_api WHERE id=NULL LIMIT 0,1) thrown in ...\system\modules\core\library\Contao\Database\Statement.php on line 282
dmolineus commented 11 years ago

Thanks for reporting. At the moment I don't have any time working on this extension.

The extension is probably not compatible with Contao 3.1.x. There were several changes with the file system, so there it's unlikely that it will work.

There will be more changes for Contao 3.2 (uuid), so I won't support the 3.1.x branch.

m-vo commented 11 years ago

Oh, ok, thanks for the response. Just for your information, in case you adapt the code. The problematic code was the following part (that should not be called before the database update):

$objApi = $this->Database->prepare('SELECT * FROM tl_cloud_api WHERE id=?')->limit(1)->execute(\Input::get('id'));

(situated in DataContainer\CloudApi.php in the methods choosePalette and chooseSubpalette)

dmolineus commented 11 years ago

Yeah, I use that to dynamically changes the used fields, depending on the installed api. Should not do it in the extension install mode ;-)

rocchidavide commented 10 years ago

I got the same error; is there a quick mode to fix it?

dmolineus commented 10 years ago

You could uncomment following line during updating the database: https://github.com/netzmacht/cloud-dropbox/blob/master/config/config.php#L19

Netzmacht\Cloud\Api\CloudApiManager::registerApi('dropbox', 'Netzmacht\Cloud\Dropbox\DropboxApi', 

// change to
//Netzmacht\Cloud\Api\CloudApiManager::registerApi('dropbox', 'Netzmacht\Cloud\Dropbox\DropboxApi', 'Dropbox');

After the database is updated, u need to reactivate it: