dereuromark / cakephp-translate

A CakePHP plugin to manage translations of your static content the easy way via web backend.
MIT License
17 stars 3 forks source link

MySQL Syntax Error when creating Translate Project #5

Closed ravage84 closed 7 years ago

ravage84 commented 7 years ago

Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default, status, created, modified) VALUES ('my-app', 0, 1, 1, '2017-05-19 ' at line 1

INSERT INTO translate_projects (name, type, default, status, created, modified) VALUES (:c0, :c1, :c2, :c3, :c4, :c5)

Ways to reproduce:

  1. CakePHP 3.4.x app setup with PHP 5.6, MySQL 5.7.12
  2. Setup as written in README
  3. Navigate to adm/translate as written in README
  4. Click Please create a project first: Project Index
  5. Click New Translate Project
  6. Fill out form and submit
dereuromark commented 7 years ago

Do you know what fields are causing it? Seems like there is one field null and schema is not nullable or sth?

ravage84 commented 7 years ago

Not yet, name is the only field that has no default but is NOT NULLable.

dereuromark commented 7 years ago

'2017-05-19 ' is there a space after the date? Maybe that kills MYSQL 5.7?

ravage84 commented 7 years ago

Could be. We have set up our dev machines rather stricl when it comes to MySQL settings (better crash on dev than on production 😼 ).

dereuromark commented 7 years ago

The default keyword probably, identifier quoting.