Kuma: Editing user profile with 4-byte characters (e.g. title field) causes ISE

Created on 25 Mar 2020  Â·  12Comments  Â·  Source: mdn/kuma

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

Screenshot (98)

p5

All 12 comments

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:

  1. Go to http://wiki.localhost.org:8000/en-US/profiles/peterbe/edit
  2. Type in 💩 into the "Title" field.
  3. 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.
Screen Shot 2020-03-27 at 4 54 06 PM

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobinmori picture tobinmori  Â·  3Comments

Matsuuu picture Matsuuu  Â·  5Comments

peterbe picture peterbe  Â·  6Comments

yakshaG picture yakshaG  Â·  3Comments

groovecoder picture groovecoder  Â·  10Comments