Removing field from form I just came across a solution regarding media module.
It suggested that:
replace all
unset($form[$id]);

to
$form[$id] = array('#language' =&gt; NULL);

in media_gallery.module
This worked nicely for my problem, but I do not understand what it actually does.
The unset is used when we want to remove a field from a form, fx when someone does not have access to the form.
Is the 2nd equivalent of the 1st?
The first statement essentially removes a field from the form. The second statement sets the field's language to undefined (neutral). They are not the same, but they both help you to deal with this module's issue as they both prevent the form from passing invalid keys to locale_field_node_form_submit().