Events Made Easy › Forums › Bug fixed or feature request implemented › All custom fields empty after update
- This topic has 15 replies, 2 voices, and was last updated 3 years ago by Anonymous.
-
AuthorPosts
-
Thu 16 Dec 2021 at 00:03 #63616AnonymousInactive
Hi Franky,
It seems I ran into quite a serious bug: after updating to the latest EME version (2.2.41) all my custom fields turned up empty! All submitted data was gone, both in past and future events.
Restoring to the previous EME version did not restore the data, fields remained empty. I had to do a full site and database restore from my backup to recover the data.Custom fields still show up in the admin and on the site, but empty.
Data vanished immediately after updating, without me saving or altering anything else, so it seems the database is directly affected by the update.
Can you shed any light on this? And hopefully fix it?
Thu 16 Dec 2021 at 00:09 #63617FrankyKeymasterErrr … what do you mean with “custom fields empty”? Which ones/where? In the events themselves you mean? Or per booking?
Thu 16 Dec 2021 at 00:12 #63618FrankyKeymasterAnd: from which version did you update?
Thu 16 Dec 2021 at 00:26 #63619FrankyKeymasterBtw, I checked the code and I didn’t touch the custom field answers database tables in the last 7 months, so …
Did you check your php error logfiles? Maybe something went wrong during the update?Thu 16 Dec 2021 at 00:27 #63620AnonymousInactiveWow, that’s a quick response! 😉
I upgraded from version 2.1.122.
I have set custom fields for Events, containing info about church services such as preacher, theme and offertory. After update all contents were gone, fields are blank in admin and on the site.
I can re-submit info, they are stored and appear on the site. But everything submitted earlier in these custom fields is gone.
It’s just the custom fields, all other info remained in place.Thu 16 Dec 2021 at 00:32 #63621AnonymousInactiveI haven’t checked the logfiles, but it happened twice so I guess it’s more than an accident. After restoring the backup I tried again and the same thing happened.
It’s past my bedtime now, but tomorrow I’ll try on another site where I have EME installed with custom fields (and needs an update), and see if the same thing happens.
Thu 16 Dec 2021 at 08:43 #63622FrankyKeymasterNo, it is a bug there. I’ll update and release once I’ve tested some more (fix already in dev).
Thu 16 Dec 2021 at 10:49 #63623AnonymousInactiveYou’re the best! Many thanks!
Thu 16 Dec 2021 at 11:04 #63624FrankyKeymasterAre you in a position to test the dev-version? You can download it at the bottom here: https://wordpress.org/plugins/events-made-easy/advanced/
Thu 16 Dec 2021 at 11:56 #63625AnonymousInactiveI installed the dev version, but unfortunately the bug appears to have shifted. Now the custom fields for all events contained data, but the same for every event.
It seemed all custom field data had been overwritten with the info that has been submitted for next week’s event (christmas sunday). I can’t think of any logic behind that.So I reverted to a backup once more.
Thu 16 Dec 2021 at 13:30 #63626FrankyKeymasterI’m copying over data from 1 table to another, so maybe the sql there is not ok … I’ll test some more.
Thu 16 Dec 2021 at 20:00 #63627FrankyKeymasterI’ve tested this again and the sql seems ok and the behavior too …
I’m wondering if the current behavior is related to some kind of mysql version. Any idea what you’re running?
In short, this is the sql being executed:
INSERT INTO wp_eme_answers(`field_id`,`related_id`,`answer`,`type`) SELECT `field_id`,`event_id`,`answer`,'event' FROM wp_eme_events_cf;
(after which the table wp_eme_events_cf gets dropped). And I tested and retested, but it works as it should.Thu 16 Dec 2021 at 20:48 #63629AnonymousInactiveI’m absolutely no sql expert, so your code looks like Chinese to me. 😉
But this is the info I got from my Site Health database info:
Extension mysqli
Server version 10.4.22-MariaDB-log-cll-lve
Client version mysqlnd 7.4.26
Database charset utf8mb4
Database collation utf8mb4_unicode_ciI just updated another site running EME with custom fields, hosted with the same hosting provider and there was no problem there. All data was where it should be. Database info from Site Health is identical.
So could it be a theme or plugin conflict? I will have to try but as I’m currently quite busy on another project that may have to wait some time.
I’ll keep you posted, many thanks so far.
Thu 16 Dec 2021 at 23:27 #63630FrankyKeymasterYour mysql/mariadb version seems ok, and the fact that it works ok for the other setup strenghtens my belief the code is now correct.
Fri 17 Dec 2021 at 10:29 #63631FrankyKeymasterI’ll move this to fixed for now.
Fri 17 Dec 2021 at 10:45 #63633AnonymousInactiveSure, I’ll get back to you if I find anything noteworthy.
Thanks and cheers! -
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.