Issues installing Traq on modern stack

444
Defect
Sketch
-
4.0
4.0
-
Fixed
Normal
Normal
1 year ago
1 year ago
0

Description

What did you do to cause this? Installing the database

What page were you on? http://local.dev/install/index.php/install

What PHP and MariaDB versions do you run? PHP 7.0.4-7ubuntu2.1 Server version: 5.7.12-0ubuntu1

Describe the defect:

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'is_admin' at row 1 in /srv/local.dev/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 115

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO usergroups (name, is_admin) VALUES (?, ?)' with params ["Members", false]: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'is_admin' at row 1 in /srv/local.dev/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 115

Ticket History

1 year and 5 months ago by Sketch

After changing things in this pull request, there are more errors as seen in this image:
xdebug errors
Stack trace

If you give me the green light, I'll go get these sorted.

More information on my setup:

  • Ubuntu 16.04
  • Apache 2.4
  • php 7
  • mysql 5.7
  • traq 4.0.0-dev-2

1 year and 5 months ago by Jack

  • Closed ticket as Fixed

Never had this issue, been using MariaDB instead of MySQL. Thank you for bringing this up and sending a pull request.

Another fix is to tell Doctrine the columns are supposed to be treated as a boolean by specifying the column data types in the models like so:

protected static $_dataTypes = [
    'is_admin' => 'boolean'
];

As for the second part, that's an issue with the old 4.0.0-dev-2 codebase, which has been fixed in the newer one on the master branch. However the master branch is far from working compared to the 4.0.0-dev-2 branch. The master branch is a major refactoring of 4.0.0-dev-2 to correct inconsistencies and cleanup code I'm unhappy with.