• Hello Marcel!

    First of all thanks for this great plugin. We use it on our school’s website. (https://gtgs.info)

    From time to time I have to restore a full backup of our website – mostly when I messed up something else. I use UpdraftPlus Backup/Restore, which restores everything – all files and complete database.

    This works great for all aspects except one – after a restore all smileys in existing guestbook posts are replaced by “????”. I then have to edit every entry manually (and just guess what smiley it could have been) to fix it.

    Any thoughts about that or an idea what could be done to prevent this?

    Thanks & regards

    Oliver

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Marcel Pol

    (@mpol)

    That is strange, it should not happen.

    There is a quick “fix” that you might do. In the wp-config.php there might be a line:
    define('DB_CHARSET', 'utf8mb4');
    You could change that to:
    define('DB_CHARSET', 'utf8');

    But I don’t think that fix makes any sense.
    It could be that you are using an older install, where the database handling was set up differently. Can you see what the database collation is for your database tables? They should all be ci_general_utf8mb4 or ci_general_utf8.
    If the database tables of WordPress core are utf8 (really utf8mb3), you could change the collation for the guestbook tables to that as well.

    Could you paste the relevant parts of your page on Dashboard > Guestbook > Settings > Debug-tab ?

    Thread Starter Oliver Schmehr

    (@oschmehr)

    Thanks for your quick reply! Ok, here’s the debug dump:

    WordPress-Version:	4.8 (db: 38590)
    WordPress-Thema:	Nirvana
    Aktive Plugins:	Array ( [0] => add-category-to-pages/add-category-to-page.php [1] => all-in-one-event-calendar-extended-views/all-in-one-event-calendar-extended-views.php [2] => all-in-one-event-calendar/all-in-one-event-calendar.php [3] => all-in-one-seo-pack/all_in_one_seo_pack.php [4] => antispam-bee/antispam_bee.php [5] => black-studio-tinymce-widget/black-studio-tinymce-widget.php [6] => browser-theme-color/browser-theme-color.php [7] => contact-form-7/wp-contact-form-7.php [8] => cryout-theme-settings/cryout-theme-settings.php [9] => email-obfuscate-shortcode/email-obfuscate-shortcode.php [10] => enable-media-replace/enable-media-replace.php [11] => flamingo/flamingo.php [12] => foobox-image-lightbox/foobox-free.php [13] => foogallery-develop/foogallery.php [14] => foogallery-polaroid-template-master/foogallery-polaroid-template.php [15] => gwolle-gb/gwolle-gb.php [16] => kama-wp-smile/kama_wp_smiles.php [17] => ps-auto-sitemap/ps_auto_sitemap.php [18] => regenerate-thumbnails/regenerate-thumbnails.php [19] => responsive-scrolling-tables/responsivescrollingtables.php [20] => responsive-youtube-videos/som-responsive-youtube-videos.php [21] => shariff/shariff.php [22] => shortcodes-ultimate/shortcodes-ultimate.php [23] => shortpixel-image-optimiser/wp-shortpixel.php [24] => so-widgets-bundle/so-widgets-bundle.php [25] => social-media-auto-publish/social-media-auto-publish.php [26] => tinymce-advanced/tinymce-advanced.php [27] => updraftplus/updraftplus.php [28] => wp-ajaxify-comments/wp-ajaxify-comments.php [29] => wp-fastest-cache-premium/wpFastestCachePremium.php [30] => wp-fastest-cache/wpFastestCache.php [31] => wp-piwik/wp-piwik.php )
    PHP-Version:	7.1.1-nmm1
    MySQL-Version:	5.6.33-nmm3-log
    MySQL-Zeichensatz:	MySQL-Zeichensatz: utf8mb4
    MySQL Column Charset: utf8mb4
    MySQL / MySQLi:	mysqli
    MySQL-Variablen:	Array ( [character_set_client] => utf8mb4 [character_set_connection] => utf8mb4 [character_set_database] => latin1 [character_set_filesystem] => binary [character_set_results] => utf8mb4 [character_set_server] => latin1 [character_set_system] => utf8 [character_sets_dir] => /usr/share/mysql/charsets/ )

    PhpMyAdmin tells me most tables are “utf8mb4_unicode_ci”, some others are “utf8_general_ci”. The 2 gwolle tables are “utf8mb4_unicode_ci”.

    The settings in wp-config.php are:

    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');

    I hope this helps a bit.

    Regards
    Oliver

    Plugin Author Marcel Pol

    (@mpol)

    Hmm, I am not sure how to give the best response.
    You could change the two gwolle tables to ‘utf8_unicode_ci’. That might help.

    I am wondering how the backup is being made. If you open the SQL file from the backup in a text editor, do they show correctly?

    Thread Starter Oliver Schmehr

    (@oschmehr)

    I downloaded the database backup , unzipped it (.gz) and found just one big file that backups all database tables.
    I was able to open this file with notepad and searched for the guestbook entries. Everything’s there, also the smileys are shown correctly.

    It seems there is no direct problem with the table collation.

    Maybe it’s a small bug when Updraftplus restores it’s own database backup. I don’t know.
    I only wonder why smileys in normal post comments get restored without any problem.

    Anyway big thanks for you effort!

    Best regards
    Oliver

    Plugin Author Marcel Pol

    (@mpol)

    I am sorry for not having a good response.

    You could play around a bit and see what works for you.

    You could change the charset in wp-config.php to utf8mb4.
    You could also change the collation of the 2 database tables to ‘utf8_unicode_ci’. That might help.

    There is probably a reason that it cannot get the unicode emoji characters after a restore. You could go one way, and seeing if you can get emoji characters to work. Or you can go the other way and use utf8mb3 and have them changed to html entities.

    If you want me to have a look, you could send me the backup file that you have. You can send it to [email protected]

    Plugin Author Marcel Pol

    (@mpol)

    I tested a bit with my test installation, and it seems dat Updraft Plus but also simple mysqldump doesn’t handle utf8mb4 characters gracefully here too. That is quite a nightmare…

    I will look into this a bit more.

    Plugin Author Marcel Pol

    (@mpol)

    Hmm, for my own mysqldump it works if I add the following option:

    --default-character-set=utf8mb4

    It seems Updraft Plus also uses mysqldump if available. If I add this option to line 1293 in class-updraftplus.php that also works for me.

    I don’t know enough about MySQL to give a better response. It would be nice if someone from Updraft Plus could comment. I added the tag for it.

    Thread Starter Oliver Schmehr

    (@oschmehr)

    I sent you an eMail.

    Thanks & regards
    Oliver

    Plugin Author Marcel Pol

    (@mpol)

    Ah, thank you. I don’t think I need it anymore though :). I should have tested earlier myself.

    By the way, I also tested with WP Migrate DB and with Duplicator, but they work fine on my install. Do they work for you?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Smileys replaced by ???? after backup’ is closed to new replies.