|
ProForm Version: 0.42.1 BETA
EE Version: 2.3.1
Problem: Adding mailing list subscription fields to form doesn’t reliably set the correct mailing list ID value (corresponding to exp_mailing_lists list_id field).
To reproduce:
1. Create 2 or more mailing lists.
2. Delete the first list created.
3. Create a new Mailing List Subscription field, tying it to the second list you created (now the first appearing in the drop down).
3a. You can see in the drop down in Web Inspector/Firebug/equivalent or View Source that the value for that list is 1, even though it should be 2 (or greater, depending on work flow up to this point) in exp_mailing_lists list_id.
4. You will see in exp_proform_fields that mailinglist_id is stored as 1, which is incorrect.
Fix:
In mcp.proform.php in the method edit_field, change the line (964):
$mailinglists = array_merge(array(0 => 'None'), $mailinglists);
to:
$mailinglists = array(0 => 'None') + $mailinglists;
array_merge doesn’t preserve numeric keys, but the plus array operator does.
|