unmark icon indicating copy to clipboard operation
unmark copied to clipboard

Handle long titles

Open gameame opened this issue 9 years ago • 2 comments

When I try to add a link with a long title, Unmark raises a database error:

A DATABASE ERROR OCCURRED

Error Number: 1406

Data too long for column 'title' at row 1

I tested this through the bookmarklet. I could't test the Chtome extension because I have a local installation and didn't find a way to customize the installation url.

You can easily test this issue on most GitHub repos (eg https://github.com/Kickball/awesome-selfhosted) because it appears that GitHub puts also the description of the repo in the title.

It would be nice if Umark could automatically truncate long titles.

gameame avatar Oct 31 '16 08:10 gameame

@gameame Agreed. Rolling this into 1.8.1 to have as an adjustment.

cdevroe avatar Apr 29 '17 00:04 cdevroe

I had the same error popped up on the bookmarklet today. I didn't test the side effects, but it seems to be working for now.

Edit your database and change marks -> title -> varchar(150) to varchar(500) or something higher. This will allow 500 character long titles to be added. Programmatically title parameter can be checked and if it exceeds 150 characters can be cropped down to 150.

duman avatar Oct 30 '18 17:10 duman