{"action":"created","issue":{"url":"https://api.github.com/repos/AnimalDesign/bolt-translate/issues/75","repository_url":"https://api.github.com/repos/AnimalDesign/bolt-translate","labels_url":"https://api.github.com/repos/AnimalDesign/bolt-translate/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/AnimalDesign/bolt-translate/issues/75/comments","events_url":"https://api.github.com/repos/AnimalDesign/bolt-translate/issues/75/events","html_url":"https://github.com/AnimalDesign/bolt-translate/issues/75","id":176953238,"number":75,"title":"[BUG] Two content types won't save after extension activated","user":{"login":"lswest","id":57859,"avatar_url":"https://avatars.githubusercontent.com/u/57859?v=3","gravatar_id":"","url":"https://api.github.com/users/lswest","html_url":"https://github.com/lswest","followers_url":"https://api.github.com/users/lswest/followers","following_url":"https://api.github.com/users/lswest/following{/other_user}","gists_url":"https://api.github.com/users/lswest/gists{/gist_id}","starred_url":"https://api.github.com/users/lswest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lswest/subscriptions","organizations_url":"https://api.github.com/users/lswest/orgs","repos_url":"https://api.github.com/users/lswest/repos","events_url":"https://api.github.com/users/lswest/events{/privacy}","received_events_url":"https://api.github.com/users/lswest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-14T16:20:09Z","updated_at":"2016-09-17T15:25:58Z","closed_at":null,"body":"I've recently set up the translate extension on an upgraded site (from Bolt 2.2 to 3.0.12).  I can add and save translations on all content types except two.  The only difference between the content types that work, and those that don't, are hyphens.  The two content types that don't work are ueber-uns, and content-marketing (defined exactly like that in the `contenttypes.yml`).\r\n\r\nI admittedly haven't tried updating the posts since the upgrade to Bolt 3.0.12 without the translate extension active, but as the multilingual documentation page recommends hyphen usage, I figured I'd start here.  In the backend, the only error message Bolt gives me is \"Could not save Über Uns\".  I enabled the debug logging in Bolt, and tried to add a translation to a page under Über Uns, and included the error below.\r\n\r\nBased off my understanding of MySQL, there should be quotes around the hyphenated column name, and I'm also uncertain why ueber-uns appears in the MySQL statement at all, as it doesn't exist in the table.\r\n\r\nIf there's any further information required, I'll be happy to pass it along.\r\n\r\nExpected Outcome\r\n--------------------------------\r\nContent is saved in the corresponding locale.\r\n\r\nActual Outcome\r\n---------------------------\r\nNo changes are saved.\r\n\r\nDetails\r\n-------\r\n\r\n - Translate Version: [ 3.1.2/master ]\r\n - Install type: [ Extension Repository ]\r\n - Bolt Version: [ 3.0.12 ]\r\n - PHP version: [ 7.0 ]\r\n - Used webserver: [ Apache  ] version [ 2.4.10 ]\r\n\r\nDB Columns\r\n----------------------\r\nThese are the names of the column fields available in bolt_ueber_uns (the relevant table).\r\n\r\n`id           \r\nslug          \r\ndatecreated   \r\ndatechanged   \r\ndatepublish   \r\ndatedepublish \r\ntemplatefields\r\nusername      \r\nownerid       \r\nstatus        \r\ntitle         \r\nbody           \r\nen_title      \r\nen_slug       \r\nde_data       \r\nde_slug       \r\nen_data       \r\nlocale`\r\n\r\nError\r\n-------\r\n\r\nThe only relevant line I can find in the bolt-debug.log file is as follows:\r\n`[2016-09-08 11:56:12] bolt.CRITICAL: Doctrine\\DBAL\\Exception\\SyntaxErrorException: An exception occurred while executing 'SELECT ueber-uns.* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = ? LIMIT 1' with params [\"1\"]:  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 '* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = '1' LIMIT 1' at line 1 (uncaught exception) at /Users/lswest/Repositories/web-development/mbc-docker/data/site/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 90 {\"exception\":\"[object] (Doctrine\\\\DBAL\\\\Exception\\\\SyntaxErrorException(code: 0): An exception occurred while executing 'SELECT ueber-uns.* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = ? LIMIT 1' with params [\\\"1\\\"]:\\n\\nSQLSTATE[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 '* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = '1' LIMIT 1' at line 1 at /Users/lswest/Repositories/web-development/mbc-docker/data/site/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:90, Doctrine\\\\DBAL\\\\Driver\\\\PDOException(code: 42000): 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 '* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = '1' LIMIT 1' at line 1 at /Users/lswest/Repositories/web-development/mbc-docker/data/site/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:93, PDOException(code: 42000): 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 '* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = '1' LIMIT 1' at line 1 at /Users/lswest/Repositories/web-development/mbc-docker/data/site/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91)\"} []\r\n[2016-09-08 11:56:12] logger.system.CRITICAL: An exception occurred while executing 'SELECT ueber-uns.* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = ? LIMIT 1' with params [\"1\"]:  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 '* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = '1' LIMIT 1' at line 1 {\"event\":\"exception\",\"exception\":\"[object] (Doctrine\\\\DBAL\\\\Exception\\\\SyntaxErrorException(code: 0): An exception occurred while executing 'SELECT ueber-uns.* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = ? LIMIT 1' with params [\\\"1\\\"]:\\n\\nSQLSTATE[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 '* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = '1' LIMIT 1' at line 1 at /Users/lswest/Repositories/web-development/mbc-docker/data/site/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:90, Doctrine\\\\DBAL\\\\Driver\\\\PDOException(code: 42000): 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 '* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = '1' LIMIT 1' at line 1 at /Users/lswest/Repositories/web-development/mbc-docker/data/site/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:93, PDOException(code: 42000): 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 '* FROM bolt_ueber_uns ueber-uns WHERE ueber-uns.id = '1' LIMIT 1' at line 1 at /Users/lswest/Repositories/web-development/mbc-docker/data/site/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91)\"} []\r\n[2016-09-08 11:56:12] bolt.INFO: < 500 [] []\r\n[2016-09-08 11:56:17] bolt.INFO: Matched route \"fileedit\". {\"route_parameters\":{\"_controller\":[\"[object] (Bolt\\\\Controller\\\\Backend\\\\FileManager: {})\",\"edit\"],\"namespace\":\"config\",\"zone\":\"backend\",\"file\":\"config.yml\",\"_route\":\"fileedit\"},\"request_uri\":\"http://mbc.home.lan/bolt/file/edit/config/config.yml?returnto=ajax\"} []\r\n[2016-09-08 11:56:17] bolt.INFO: > POST /bolt/file/edit/config/config.yml?returnto=ajax [] []\r\n[2016-09-08 11:56:17] bolt.INFO: < 200 [] []`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AnimalDesign/bolt-translate/issues/comments/247780969","html_url":"https://github.com/AnimalDesign/bolt-translate/issues/75#issuecomment-247780969","issue_url":"https://api.github.com/repos/AnimalDesign/bolt-translate/issues/75","id":247780969,"user":{"login":"lswest","id":57859,"avatar_url":"https://avatars.githubusercontent.com/u/57859?v=3","gravatar_id":"","url":"https://api.github.com/users/lswest","html_url":"https://github.com/lswest","followers_url":"https://api.github.com/users/lswest/followers","following_url":"https://api.github.com/users/lswest/following{/other_user}","gists_url":"https://api.github.com/users/lswest/gists{/gist_id}","starred_url":"https://api.github.com/users/lswest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lswest/subscriptions","organizations_url":"https://api.github.com/users/lswest/orgs","repos_url":"https://api.github.com/users/lswest/repos","events_url":"https://api.github.com/users/lswest/events{/privacy}","received_events_url":"https://api.github.com/users/lswest/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T15:25:58Z","updated_at":"2016-09-17T15:25:58Z","body":"Thanks for the feedback.  I've removed the hyphens, renamed the tables in MySQL, and then replaced the hyphens with underscores, and renamed the tables again (after each change, I also ran the database check, to update the structure).  Now I can successfully translate the content types that were causing issues, and I haven't lost any data.  I would prefer a hyphen in the URLs, but I can live with an underscore."}}
{"actor":{"display_login":"lswest"}}