kuma
kuma copied to clipboard
Editing user profile with 4-byte characters (e.g. title field) causes ISE
Firefox MDN Web docs after submitting edited profile it is showing internal server error What is the problem? If click on editing my MDN Web docs account then all information/data and changes it taking but when i click on submitting that information browser showing internal server error .i think i have problem with network but i did it twice still it showing me that window .i think submit button is not taking any entries or server is loaded or not taking any inputs .i linked image below please go through with that.๐ฝ thank you krishna kakade
Hi @krishnadevz thanks for logging this.
(For those with access it's this one: https://sentry.prod.mozaws.net/operations/mdn-prod/issues/7637581/)
What happened is that you typed into your Title an emojii or some other 4-byte character that our MySQL couldn't cope with.
i haven't typed anything in title i leave it as it is blank that and after submitting that it is showing me internal server error @peterbe
and i did this thing now it is working but i am still opened this issue and after your reply i will close it seems like issue is resolve now .
Thanks @krishnadevz It's not your fault. We need to fix our old database. It's tech debt. But I guess it's resolved for you personally, now, right?
Steps to reproduce:
- Go to http://wiki.localhost.org:8000/en-US/profiles/peterbe/edit
- Type in ๐ฉ into the "Title" field.
- Press "Publish."
thanks @peterbe Can We close this issue now ?.i think we done and take care baby is cute๐๐บ
thanks @peterbe Can We close this issue now ?.i think we done and take care baby is cute๐๐บ
We can't. You helped us uncover the problem deeper in our database. The immediate solution for you would be to change what you're attempting to save. However, if you don't like the noise of this GitHub issue you can unsubscribe. From now on, we'll use this issue to discuss the problem with the database. Are you OK with that?
yes i am okay but i am able to edit now . and it is good know how things work in mdn i am not going to unsubscribe it .๐โ
I was able to fix this. At least in mysql inside docker-compose.
So there's hope!
Note to self; after a lot of experimenting and scripting I was able to make this: https://gist.github.com/peterbe/432198400e88d49da9ca68ad251ad767
After running that on my mysql inside docker-compose
I was able to use 4-byte Unicode everywhere.
But sadly, it doesn't work on the production database because some rows either can't handle the shrinking or they'd reduce what was unique to same values which breaks some uniqueness constraints.
Also, note-to-self; Here's how you find out the columnt types of a table:
select * from information_schema.columns where table_name= 'attachments_attachmentrevision';
and here's how you find out which of those are indexed:
SHOW INDEX FROM attachments_attachmentrevision FROM developer_mozilla_org;
And here's the hacky incomplete script I used to make those SQL statements: https://gist.github.com/peterbe/4865cec256dab5c68076c6b3a8c8fba8
Sentry issue: MDN-PROD-13Z
Sentry issue: MDN-PROD-14C