joomla / jissues

Issue tracking application extending GitHub's issues and pull requests for the Joomla! project.
https://issues.joomla.org
GNU General Public License v2.0
69 stars 81 forks source link

Sample Data doesn't install #1006

Open wilsonge opened 6 years ago

wilsonge commented 6 years ago

Steps to reproduce the issue

Install sample sql data

Expected result

I can install the issue tracker

Actual result

I can't

INSERT INTO `#__tracker_projects` (`project_id`, `title`, `alias`, `gh_user`, `gh_project`, `ext_tracker_link`, `short_title`) VALUES
(1, 'Joomla! CMS', 'joomla-cms', 'joomla', 'joomla-cms', 'http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=%d', 'CMS'),
(2, 'J!Tracker', 'jtracker', 'joomla', 'jissues', '', 'J!Tracker'),
(3, 'Joomla! Security', 'joomla-security', '', '', '', 'JSST')
MySQL said: Documentation

#1364 - Field 'gh_editbot_user' doesn't have a default value
INSERT INTO `#__articles` (`title`, `alias`, `text`, `text_md`, `created_date`) VALUES
('The J!Tracker Project', 'about', '<p>Some info about the project here... @todo add more</p>', 'Some info about the project here...  @todo add more', '2013-10-01 00:00:00')
MySQL said: Documentation

#1364 - Field 'path' doesn't have a default value
#1364 - Field 'is_file' doesn't have a default value
b2z commented 6 years ago

Is it when you try to run get project?

wilsonge commented 6 years ago

nope. when i try to run bin/jtracker install to setup my db

b2z commented 6 years ago

Hmm, I've tried several times to install from scratch and did not hit this error. As I understand you are not running vagrant setup? If yes then check this one: https://stackoverflow.com/questions/15438840/mysql-error-1364-field-doesnt-have-a-default-values

alikon commented 6 years ago

maybe dued to strict mode different setting can you check the STRICT_TRANS_TABLES with something like SHOW VARIABLES LIKE 'sql_mode';

if you got STRICT_TRANS_TABLES than means that if you declare a field not null like gh_editbot_user then it must have a value always

b2z commented 6 years ago

@alikon is it something that we should fix in JIssues to avoid such in the feature?

alikon commented 6 years ago

with this requirement :

MySQL 5.5.3 with InnoDB support (required to support the MySQL utf8mb4 charset)

a quick & easy fix should be to set sql_mode to non_strict mode (the default for 5.5) $db->query("SET @@SESSION.sql_mode = '';");