2

I am using the media-gallery module to create dynamic galleries for a site.
I have a problem when I edit a node; I get the following error:

Notice: Undefined index: media_gallery_format in locale_field_node_form_submit() (linea 405)

I have read Undefined indexes in locale_field_node_form_submit(), but I didn't resolve the problem. The issue report suggests that the error depends from a local language, and that I should change one line in media-gallery.module, but I don't understand where that line is, and how to change the code.

Can anybody help me?

  • The solution reported in the issue report is to replace any occurrence of unset($form[$id]) with $form[$id] = array('#language' => NULL) in the module file; it just a matter of doing a "search and replace" on a file. What do you exactly don't understand? – kiamlaluno Apr 6 '11 at 10:33
  • Thank you kiamlaluno!! I dont understand where can i replace that string (problebly in media-gallery.module in line? ), sorry for my english... – gbwebservice Apr 6 '11 at 12:01
  • Sorry kiamlaluno but i must replace all strings in "function media_gallery_form_media_gallery_node_form_alter(&$form, &$form_state)" with occurence "unset($form[$id])" with "$form[$id] = array('#language' => NULL)" ? – gbwebservice Apr 6 '11 at 12:12
  • See my answer. – kiamlaluno Apr 6 '11 at 12:29
2

The solution reported in the issue report is to replace every occurrence of unset($form[$id]) with $form[$id] = array('#language' => NULL) in all the module file; you just search for the first string, and you replace it with the second string. The module file is media_gallery.module.
Who suggests the fix doesn't report in which line you find unset($form[$id]) because you probably find more occurrences of that string, and the user doesn't want to make a list of all the lines containing that string. It is also useless to make such list, as an editor can easily make a search and replace for the strings listed in the issue report.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.