hpolthof / laravel-translations-db

Laravel Translations from Database
https://packagist.org/packages/hpolthof/laravel-translations-db
GNU General Public License v2.0
52 stars 37 forks source link

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'en-record-aliqua... #11

Closed freel132 closed 8 years ago

freel132 commented 8 years ago

Hello,

I am getting error:

ErrorException in Connection.php line 669: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'en-record-aliquam-erat-volutpat-praesent-quis-nibh-nisl-cras-at-' for key 'translations_locale_group_name_unique' (SQL: insert into translations (locale, group, name, viewed_at, updated_at, created_at) values (en, record, aliquam-erat-volutpat-praesent-quis-nibh-nisl-cras-at-libero-quam-ut-tincidunt-diam-fusce-aliquet-augue-a-ipsum-ullamcorper-semper-suspendisse-potenti-proin-id-eros-eu-lectus-blandit-suscipit-id-eget-tortor-nulla-augue-purus-molestie-accumsan-ullamcorper-ut-dictum-sit-amet-erat-proin-eu-leo-eros-eu-tincidunt-lorem-donec-sit-amet-mauris-vitae-felis-viverra-tristique-mauris-varius, 2016-03-13 07:33:50, 2016-03-13 07:33:50, 2016-03-13 07:33:50)) (View: /Users/Freel/Desktop/Web/project21.dev/resources/views/blocks/Records.blade.php)

what is funny that i am sure that this value is unique. This error happens when I am entering description. In other words long text. I already tryed to do something like that:

$newvalue = substr(str_slug($value),0,100);

it not helped me at all... anyone have any idea whats the problem?

freel132 commented 8 years ago

ok found mistake. Problem was in DB field type issue.