Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation during setup of TYPO3 Extension piwikintegration #1038

Closed
anonymous-matomo-user opened this issue Nov 15, 2009 · 2 comments
Closed
Labels
duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.

Comments

@anonymous-matomo-user
Copy link

Hello guys,

i do wanna install piwik automated during the installation of piwikintegration plugin of TYPO3.

This referrs to #781.

I used:

$existingTables = $GLOBALS['TYPO3_DB']->admin_get_tables();
Piwik::createConfigObject(PIWIK_INCLUDE_PATH.'config/config.ini.php');
$neededTables = Piwik::getTablesCreateSql();;
foreach($neededTables as $table=>$tableQuery) {
if(!array_key_exists($table,$existingTables)) {
$GLOBALS['TYPO3_DB']->admin_query($tableQuery);
}
}

To create the tables for piwik.
Directly after the installation i got the following error:
Your Piwik database is out-of-date, and must be upgraded before you can continue.
Piwik database will be upgraded from version 0.2.9 to the new version 0.4.5.

After clicking on update, i got the following error:
Critical Error during the update process:

E:\mowes\www\t3alpha4.3\typo3conf\piwik\piwik\core\Updates\0.2.10.php:
Error trying to execute the query 'CREATE TABLE tx_piwikintegration_option (
option_name VARCHAR( 64 ) NOT NULL ,
option_value LONGTEXT NOT NULL ,
autoload TINYINT NOT NULL DEFAULT '1',
PRIMARY KEY ( option_name )
) DEFAULT CHARSET=utf8
'.
The error was: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tx_piwikintegration_option' already exists

Please give me a hint, how to tell piwik to create the necessary tables to get started with piwik.

Thanks a lot.

Kay
Keywords: Automated Installer

@robocoder
Copy link
Contributor

You're missing a slash. You might also want to look at some changes in convention. Try:

Piwik::createConfigObject(PIWIK_USER_PATH.'/config/config.ini.php'); 

Please add your suggestions or patch to #991. Thanks.

@anonymous-matomo-user
Copy link
Author

i'm now able to install piwik fully automated ;).
i'll post a link to the TYPO3 classes and to the repository now.
the extension is still under heavy development, but i think it's the right way to use the api as often as possible. ...

http://forge.typo3.org/repositories/show/extension-piwikintegration
interesting revision is 26607 in the repository

best regards kay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

4 participants