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

No error message is shown when a plugin fails to be installed #9160

Closed
tsteur opened this issue Nov 3, 2015 · 1 comment
Closed

No error message is shown when a plugin fails to be installed #9160

tsteur opened this issue Nov 3, 2015 · 1 comment
Assignees
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Usability For issues that let users achieve a defined goal more effectively or efficiently.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Nov 3, 2015

My plugin does the following in the install method:

    public function install()
    {
        $table = "`idcustomdimension` BIGINT UNSIGNED NOT NULL,
                  `idsite` BIGINT UNSIGNED NOT NULL ,
                  `name` VARCHAR(100) NOT NULL ,
                  `index` SMALLINT UNSIGNED NOT NULL ,
                  `scope` VARCHAR(10) NOT NULL ,
                  `active` TINYINT UNSIGNED NOT NULL DEFAULT 0,
                  `extractions` TEXT NOT NULL DEFAULT '',
                  UNIQUE KEY idcustomdimension_idsite (`idcustomdimension`, `idsite`)
                  UNIQUE KEY uniq_hash(idsite, `scope`, `index`)";

        DbHelper::createTable($this->tableName, $table);
    }

I was missing a comma before the second UNIQUE KEY. It tried to install it and failed but I was not notified in the UI about this problem. I thought it only did not find the install method or did not notice yet that it is not installed and took me a while to figure out there is an error in the SQL.

@tsteur tsteur added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. labels Nov 3, 2015
@mattab mattab added this to the 2.15.1 milestone Nov 3, 2015
@mattab
Copy link
Member

mattab commented Nov 3, 2015

@tsteur
+1 to fix in 2.15.1 (assuming it is trivial) and prevent some confusion to plugin developers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Usability For issues that let users achieve a defined goal more effectively or efficiently.
Projects
None yet
Development

No branches or pull requests

2 participants