[wp-trac] [WordPress Trac] #60362: Emojis cause "Updating failed. Could not update post in the database." error

WordPress Trac noreply at wordpress.org
Tue Feb 6 15:22:14 UTC 2024


#60362: Emojis cause "Updating failed. Could not update post in the database."
error
-------------------------------------------------+-------------------------
 Reporter:  mikefitzman                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Database                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-testing-info needs-testing       |     Focuses:
  needs-screenshots                              |
-------------------------------------------------+-------------------------

Comment (by salzano):

 OK. I deactivated all plugins. I still can't save a flag emoji in a
 Template Part.

 I found that my tables were not all the same collation. I ran the query
 `SHOW TABLE STATUS` and found they looked like this:


 {{{
 wp_cf_form_entries      utf8mb4_unicode_520_ci
 wp_cf_form_entry_meta   utf8mb4_unicode_520_ci
 wp_cf_form_entry_values utf8mb4_unicode_520_ci
 wp_cf_forms     utf8mb4_unicode_520_ci
 wp_cf_pro_messages      utf8mb4_unicode_520_ci
 wp_cf_queue_failures    utf8mb4_unicode_520_ci
 wp_cf_queue_jobs        utf8mb4_unicode_520_ci
 wp_commentmeta  utf8mb3_general_ci
 wp_comments     utf8mb3_general_ci
 wp_edd_adjustmentmeta   utf8mb4_unicode_520_ci
 wp_edd_adjustments      utf8mb4_unicode_520_ci
 wp_edd_customer_addresses       utf8mb4_unicode_520_ci
 wp_edd_customer_email_addresses utf8mb4_unicode_520_ci
 wp_edd_customermeta     utf8mb3_general_ci
 wp_edd_customers        utf8mb3_general_ci
 wp_edd_license_activations      utf8mb3_general_ci
 wp_edd_licensemeta      utf8mb3_general_ci
 wp_edd_licenses utf8mb3_general_ci
 wp_edd_logmeta  utf8mb4_unicode_520_ci
 wp_edd_logs     utf8mb4_unicode_520_ci
 wp_edd_logs_api_requestmeta     utf8mb4_unicode_520_ci
 wp_edd_logs_api_requests        utf8mb4_unicode_520_ci
 wp_edd_logs_file_downloadmeta   utf8mb4_unicode_520_ci
 wp_edd_logs_file_downloads      utf8mb4_unicode_520_ci
 wp_edd_notemeta utf8mb4_unicode_520_ci
 wp_edd_notes    utf8mb4_unicode_520_ci
 wp_edd_notifications    utf8mb4_unicode_520_ci
 wp_edd_order_addresses  utf8mb4_unicode_520_ci
 wp_edd_order_adjustmentmeta     utf8mb4_unicode_520_ci
 wp_edd_order_adjustments        utf8mb4_unicode_520_ci
 wp_edd_order_itemmeta   utf8mb4_unicode_520_ci
 wp_edd_order_items      utf8mb4_unicode_520_ci
 wp_edd_order_transactions       utf8mb4_unicode_520_ci
 wp_edd_ordermeta        utf8mb4_unicode_520_ci
 wp_edd_orders   utf8mb4_unicode_520_ci
 wp_gf_addon_feed        utf8mb4_unicode_520_ci
 wp_gf_draft_submissions utf8mb4_unicode_520_ci
 wp_gf_entry     utf8mb4_unicode_520_ci
 wp_gf_entry_meta        utf8mb4_unicode_520_ci
 wp_gf_entry_notes       utf8mb4_unicode_520_ci
 wp_gf_form      utf8mb4_unicode_520_ci
 wp_gf_form_meta utf8mb4_unicode_520_ci
 wp_gf_form_revisions    utf8mb4_unicode_520_ci
 wp_gf_form_view utf8mb4_unicode_520_ci
 wp_gf_rest_api_keys     utf8mb4_unicode_520_ci
 wp_links        utf8mb3_general_ci
 wp_nextend2_image_storage       utf8mb3_general_ci
 wp_nextend2_section_storage     utf8mb3_general_ci
 wp_nextend2_smartslider3_generators     utf8mb3_general_ci
 wp_nextend2_smartslider3_sliders        utf8mb3_general_ci
 wp_nextend2_smartslider3_sliders_xref   utf8mb3_general_ci
 wp_nextend2_smartslider3_slides utf8mb3_general_ci
 wp_options      utf8mb3_general_ci
 wp_p2p  utf8mb4_unicode_520_ci
 wp_p2pmeta      utf8mb4_unicode_520_ci
 wp_postmeta     utf8mb3_general_ci
 wp_posts        utf8mb3_general_ci
 wp_redirection_404      utf8mb4_unicode_520_ci
 wp_redirection_groups   utf8mb4_unicode_520_ci
 wp_redirection_items    utf8mb4_unicode_520_ci
 wp_redirection_logs     utf8mb4_unicode_520_ci
 wp_term_relationships   utf8mb3_general_ci
 wp_term_taxonomy        utf8mb3_general_ci
 wp_termmeta     utf8mb3_general_ci
 wp_terms        utf8mb3_general_ci
 wp_usermeta     utf8mb3_general_ci
 wp_users        utf8mb3_general_ci
 }}}


 I used the linked github page to run queries to change them. Every table
 in the database is now utf8mb4_unicode_ci. I still can't save the flag
 emoji in a Template Part.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60362#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list