laravel-translation-manager: SQLSTATE[42000]: Syntax error or access violation: 1055

PDOException in PDOConnection.php line 77:
SQLSTATE[42000]: Syntax error or access violation: 1055 'invoices.ltm_translations.id' isn't in GROUP BY (SQL: select * from `ltm_translations` group by `locale`)

Clean Laravel 5.3 install, ltm version 2.5. Downgraded to 2.4 - problem vanished.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Hey!

In config/database.php at “mysql” change : 'strict' => true, to false. Hope it helps!

@opmvpc, you saved me there 😃 That fixed the problem right away. I have checked the list of limitation modes applied when 'strict' => true and found none that is particularly useful to my current project. Thank you!

  1. Open config/database.php
  2. Change value strict from true to false

‘mysql’ => [ ‘driver’ => ‘mysql’, ‘host’ => env(‘DB_HOST’, ‘127.0.0.1’), ‘port’ => env(‘DB_PORT’, ‘3306’), ‘database’ => env(‘DB_DATABASE’, ‘forge’), ‘username’ => env(‘DB_USERNAME’, ‘forge’), ‘password’ => env(‘DB_PASSWORD’, ‘’), ‘unix_socket’ => env(‘DB_SOCKET’, ‘’), ‘charset’ => ‘utf8mb4’, ‘collation’ => ‘utf8mb4_unicode_ci’, ‘prefix’ => ‘’, ‘strict’ => false, ‘engine’ => null, ],

  1. Save

You can read full in my post => How to Fix SQLSTATE[42000]: Syntax error or access violation: 1055

Because of L5.1-L5.3 compat, see #138

@barryvdh I am pretty sure it is. If you change $locales = Translation::groupBy('locale')->get()->pluck('locale'); to $locales = Translation::groupBy('locale')->pluck('locale'); Problem disappears.