Event Custom Field Overwrite
Overview
Please describe your problem or bug in detail.
On custom fields for Events, if you save the record, then leave, then come back in, the custom data doesn't show up in the UI but actually is in the database. Even worse, if you save that record again, the blank fields in the UI overwrite the data in the database. So if you go in to edit the event, and don't notice the blank custom fields, when you save, you will overwrite the custom data and not even know it.
I first noticed this on a client site in WP on 5.66.0, and have confirmed it on wpmaster and d7master on 5.68.alpha1. It doesn't appear to happen on contacts, but I didn't test any other entities.
https://chat.civicrm.org/civicrm/pl/q6jpjss4x7byiqkejar1nbhxkw
Reproduction steps
Current behaviour
What happens currently. Please provide error messages, screenshots or gifs (LICEcap, SilentCast) where appropriate.
Expected behaviour
Environment information
- Browser: recent chrome and firefox
- CiviCRM: d7 and wp master 5.68.alpha1, wp 5.66.0
- PHP: 8.1
- CMS: wp and d7
- Database: MySQL 5
- Web Server: not sure
Comments
Anything else you would like the reviewer to note.