-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emoji causes failed slug generation #1702
Comments
Some more context, here. I am using MySQL for my backing storage for my Known instance. For the above example, here it what is stored in the
Contents: {"access":"PUBLIC","owner":"http:\/\/cleverdevil.io\/profile\/cleverdevil","body":"https:\/\/twitter.com\/aaronpk\/status\/852613547922042880","repostof":"https:\/\/twitter.com\/aaronpk\/status\/852613547922042880","description":false,"tags":false,"pageTitle":"Aaron Parecki on Twitter: \"Micropub PR published today! \ud83c\udf89 https:\/\/t.co\/B4se7jOPPr This is the last step before REC status! We'd love your impl reports and feedback!\"","slug":"aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this","created":1492118357,"updated":1492118357,"publish_status":"published","_id":"f489a455d3570e046c63751a5755d141","uuid":"https:\/\/cleverdevil.io\/2017\/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this","entity_subtype":"IdnoPlugins\\Like\\Like"} As far as I can tell, everything looks good. The entity is there in MySQL, the JSON can be parsed and is valid. But, I get a 404 when I try and visit the permalink. |
That said, there seems to be nothing in the |
Okay, I just manually inserted the following rows into my MySQL database, and now the post shows up: insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'access',
'PUBLIC'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'body',
'https://twitter.com/aaronpk/status/852613547922042880'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'created',
'2017-04-13 09:04:17'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'description',
'0'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'entity_subtype',
'IdnoPlugins\Like\Like'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'likeof',
'https://twitter.com/aaronpk/status/852613547922042880'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'owner',
'http://cleverdevil.io/profile/cleverdevil'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'pageTitle',
'Aaron Parecki on Twitter: "Micropub PR published today..."'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'publish_status',
'published'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'slug',
'aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'tags',
'0'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'updated',
'1492118357'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'uuid',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this'
);
insert into metadata(_id, collection, entity, name, value) values(
'f489a455d3570e046c63751a5755d141',
'entities',
'https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this',
'_id',
'f489a455d3570e046c63751a5755d141'
); |
So, confirmed, the source of this bug is the |
Okay, I was able to fix this issue entirely with changes to MySQL, and no changes to Known's code, by following the advice from this post about mysql and utf8mb4. TL;DR:
I believe that the installation instructions and any automated installation bits and pieces when running against MySQL should create the database and tables properly in the first place, and detect any misconfiguration regarding character sets and inform the user. |
While trying to do this:
Perform a "repost" from Quill of this Twitter permalink.
I encountered this error:
The repost works, but the generated slug doesn't actually work, so you can't link to the post on my site. This is the slug that is generated:
https://cleverdevil.io/2017/aaron-parecki-on-twitter-micropub-pr-published-today-b4se7joppr-this
As you can see, the link returns a 404. However, you can scroll down and find the post itself in my timeline.
Also of note, once you find the post in my timeline, is that it also displays the improper encoding of special characters from this related issue:
Aaron Parecki on Twitter: "Micropub PR published today! 🎉 https://t.co/B4se7jOPPr This is the last step before REC status! We'd love your impl reports and feedback!"
Some other notes:
The text was updated successfully, but these errors were encountered: