-
Notifications
You must be signed in to change notification settings - Fork 147
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
Migration for release 4.8.0 fails for unicode characters #1047
Comments
@mortbauer How exactly do you set the string before running the migration? (I tried setting it manually in mariadb, through the rails console and even by rolling back, sending a message containing emojis and re-migrating, but the error never occurred. I also tried various levels of escape characters, but to no avail.) |
Happens directly in the migrations; well just happened for 3 foodcoops out of 83 so it really because of special characters like in the example posted above. |
Like I said, I did both (set it directly in the db and send a message with that text), but running the migration afterwards did not throw an error for me. I tested on f4a4528 with the local docker dev setup. |
No idea. |
Hm I cannot reproduce the error either. I can also understand that you @mortbauer don't want to spend more time on this. Would it be okay to close this issue then until someone else encounters this error again or you find time & motivation to provide more information how we might reproduce the error? |
Hm, understood, I simply close this issuel, we still have it documented then in case sombody else stumbles over it. |
Ok so this was actually not only affecting migrations but also creating new messages. And they reason is that the characterset was not utf8mb but utf8mb3. I changed this now all over the place, set it for the rails database connection encoding but I also had to manually run |
I think we should mention this at least in known issues or something, because it is nasty! |
@mortbauer Nice find 👍 I investigated a little too - here's what I found out:
-> I immediately get the following error: So the data couldn't even be stored in the db (If I then upgrade to the latest master, all migrations run without errors even if the database's default collation is utf8mb3.) So the only way this can occur is, if
I agree with that - it's a nasty pitfall. |
wow thanks, great investigation! I'll put a note to the release notes, definitely a nasty pitfall! |
The release 4.8.0 includes pull request Introduce Message Formatting with Actiontext Trix Editor #1013
the migration 20230215085312_migrate_message_body_to_action_text.rb will fail if the message includes unicode characters like emojis.
for example the following text:
The text was updated successfully, but these errors were encountered: