gergo85 / oc-news

This is the simple news and newsletter plugin for October CMS and Winter CMS.
http://octobercms.com/plugin/indikator-news
MIT License
42 stars 29 forks source link

Data too long for column 'title' at row 1 (SQL: insert into `indikator_news_posts...) #138

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hello, I am migrating old articles from my old website and the articles titles are quite long over 120 characters so I am hitting the title character limit. Is there any possibility to increase the title limit?

Been searching the web and there seem to be some solution but don't feel like modifying the database directly... https://stackoverflow.com/questions/51918416/october-cms-data-too-long-for-column-content-at-row-1

I removed some text from this error log but you can test creating articles with titles over 120 characters "SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'title' at row 1 (SQL: insert into `indikator_news_posts` (`user_id`, `title`, `slug`, `category_id`, `tags`, `introductory`, `content`, `image`, `published_at`, `status`, `featured`, `updated_at`, `created_at`) values (0, TEXT, TEXT, 2, TAGS, <p>TEXT</p>, <p>TEXT</p>, , 2010-06-17 09:00:00, 1, 2, 2020-08-21 10:22:40, 2020-08-21 10:22:40))" on line 664 of /var/www/o/vendor/laravel/framework/src/Illuminate/Database/Connection.php

gergo85 commented 4 years ago

Hello,
Yes, it is possible. Change the 'title' and 'slug' columns size to 191 from 100 in the 'indikator_news_posts' table.