5.51 - Import - Notice error on map fields form
Reproduction steps
- Enable Debugging: https://dmaster.demo.civicrm.org/civicrm/admin/setting/debug?reset=1
- Import a contact
- Got an e-notice on the match fields forms:
Notice: Undefined index: isCheked in include() (line 35 of /srv/buildkit/build/dmaster/web/sites/default/files/civicrm/templates_c/en_US/%%72/72E/72E39105%%MapField.tpl.php).
Current behaviour
The e-notice will appear regardless whether a saved field mapping is used or not.
Forcing an form validiation when trying to go to the preview form will not show the e-notice, since the form rule will set the template variable.
Expected behaviour
No e-notice shown.
Comments
I can reproduce this with 5.50.4 and since there don't seem to be any recent change, I would assume that it is no (recent) regression.
I can't wrap my head around, what the javascript in https://github.com/civicrm/civicrm-core/blob/4a01628cfa19ac305b5734e8ea36713f363b8d91/templates/CRM/Contact/Import/Form/MapField.tpl#L24-L34 is actually supposed to achieve, but here is an uneducated fix for making the e-notice go away: https://github.com/civicrm/civicrm-core/pull/23906