Unable to add Bookmark with special characters in title or very long titles
r7l opened this issue · 3 comments
Hello,
i've tried to add this site to my bookmarks: https://github.com/vuejs/awesome-vue and it crashed the database because of that fancy icon they have in their title.
A DATABASE ERROR OCCURRED
Error Number: 1366
Incorrect string value: '\xF0\x9F\x8E\x89 A...' for column `unmark`.`marks`.`title` at row 1
INSERT INTO `marks` (`title`, `url`, `created_on`, `url_key`) VALUES ('GitHub - vuejs/awesome-vue: 🎉 A curated list of awesome things related to Vue.js', 'https://github.com/vuejs/awesome-vue', '2019-04-17 18:57:25', '0164d84940f9b41c691a1851f8b742c0')
Filename: models/Marks_model.php
Line Number: 47
Just found a site with a very long title. Runs into the same issue: https://github.com/Kickball/awesome-selfhosted
A DATABASE ERROR OCCURRED
Error Number: 1406
Data too long for column 'title' at row 1
INSERT INTO `marks` (`title`, `url`, `created_on`, `url_key`) VALUES ('Kickball/awesome-selfhosted: This is a list of Free Software network services and web applications which can be hosted locally. Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.', 'https://github.com/Kickball/awesome-selfhosted', '2019-04-17 21:03:24', '8baf0bca48b6bacdcc4e1fa581a6522f')
Filename: models/Marks_model.php
Line Number: 47
Maybe it would help if it would be possible to edit everything prior of saving it to the DB. I can't add both sites. Whatever i tried to do.
@r7l Thank you for reporting this issue. The very long titles one is a known issue #184. Both of these issues would be solved by adding a new migration (meaning, a change to the database). We've tried to keep those changes to a minimum in the latest few releases but will need to make them soon.
Perhaps we'll include these fixes in 2.0. I'll keep this issue updated if we can squeeze it in. We'd like this fixed as much as anyone!
Thanks! I've did a fresh install of Unmark and was running into it. I'll check back once i'll see a 2.0 version.