Skip to content

[4.0] Enable utf8mb4 in database connections#24704

Merged
wilsonge merged 2 commits into4.0-devfrom
utf8mb4-4.0
Apr 23, 2019
Merged

[4.0] Enable utf8mb4 in database connections#24704
wilsonge merged 2 commits into4.0-devfrom
utf8mb4-4.0

Conversation

@wilsonge
Copy link
Contributor

Pull Request for Issue #24697

Enables UTF8MB4 support in the database drivers when available

@wilsonge wilsonge changed the title Enable utf8mb4 in database connections [4.0] Enable utf8mb4 in database connections Apr 23, 2019
@infograf768
Copy link
Member

Does not solve the issue here.

@brianteeman
Copy link
Contributor

:) same error for me after applying the patch and trying to create an article with an emoji as the title
Save failed with the following error: Incorrect string value: '\xF0\x9F\x8E\x81\xE2\x9C...' for column 'title' at row 1

@brianteeman
Copy link
Contributor

correction:
I still cannot insert an emoji in the title of a new article
But I can now insert an emoji in the title of an existing article

The difference between the two cases is either due to the INSERT vs UPDATE in the sql
OR it is failing at the create alias stage

@mbabker
Copy link
Contributor

mbabker commented Apr 23, 2019

It might not fix that issue, but it does in general fix the configuration issue of utf8mb4 needing to be explicitly enabled in the driver config. So, this should still be merged but further troubleshooting of #24697 might be needed.

@wilsonge
Copy link
Contributor Author

OK So at minimum I'd hope that the Database Connection Collation screenshot in the original PR is switched to be utf8mb4. Can you guys confirm?

@chetanmadaan
Copy link

@wilsonge
The Database Connection Collation still reads utf8_general_ci, before and after the patch with both (Mysqli and Mysql (PDO), DB drivers.

@wilsonge
Copy link
Contributor Author

Ugh I made a really stupid bug in the code. Can you try again please

@chetanmadaan
Copy link

Checking now...

@chetanmadaan
Copy link

Awesome.

System config now reads collect collation for both DB Drivers and I am able to save Emoji's as well.

Database Connection Collation |
-- | --
utf8mb4_general_ci

Copy link

@chetanmadaan chetanmadaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These fix the issue.

@wilsonge
Copy link
Contributor Author

This passed on drone but it hasn't apparently sent the response back to github http://ci.joomla.org/joomla/joomla-cms/17341 :(

@wilsonge wilsonge merged commit 5ef4c9d into 4.0-dev Apr 23, 2019
@wilsonge
Copy link
Contributor Author

Merging with the good test and @mbabker 's review

@wilsonge wilsonge deleted the utf8mb4-4.0 branch April 23, 2019 16:02
@wilsonge wilsonge added this to the Joomla 4.0 milestone Apr 23, 2019
@brianteeman
Copy link
Contributor

Just confirming it worked for me too


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24704.

@chetanmadaan
Copy link

Further confirmed that the emoji's work on new and existing articles and in title and article description as well.
image

image

Thank you @wilsonge for the promptness in getting this done.

@wilsonge
Copy link
Contributor Author

No worries. Thanks for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants