Seeing "Undefined index: #autocomplete_path in theme_textfield()" after recent islandora_xml_forms updates

155 views
Skip to first unread message

Peter Murray

unread,
May 20, 2013, 9:56:26 PM5/20/13
to islandora-dev@googlegroups.com Development
I am seeing this notice that I can't seem to get rid of:

Notice: Undefined index: #autocomplete_path in theme_textfield() (line 3821 of /Users/peter/reposervice/drupal/includes/form.inc).

The notice appears after editing the object's metadata using a custom metadata form (https://gist.github.com/dltj/5617009). I am one commit ahead of http://github.com/islandora/islandora_xml_forms (see https://github.com/Islandora/islandora_xml_forms/pull/96 for details), but if I revert back to the upstream head I still see the error. I don't see the error with the built-in Basic image MODS form, so I know it is something with this particular custom metadata form, but I can't figure out what it might be. The notice is being generated by the core Drupal code, so that doesn't help much. The string "autocomplete" doesn't appear in the XML exported version of the form, so I'm at a bit of a loss on how to troubleshoot this problem.

Suggestions welcome!


Peter
--
Peter Murray
Assistant Director, Technology Services Development
LYRASIS
Peter....@lyrasis.org
+1 678-235-2955
800.999.8558 x2955

Peter .

unread,
May 21, 2013, 11:48:05 AM5/21/13
to island...@googlegroups.com
Hi Peter,

Just a shot in the dark but I would look at the form builder module and search for #autocomplete_path (it must be being set in there if you are not setting it). Or you could put a debug_backtrace() print statement in the forms.inc file and view the call stack (which might help pinpoint what module might be the cause).

Peter

Nigel Banks

unread,
May 21, 2013, 4:43:14 PM5/21/13
to island...@googlegroups.com
Seems like this might be related to the recent updates for autocomplete support in tag elements.

https://github.com/Islandora/islandora_xml_forms/blob/7.x/elements/includes/Tags.inc#L143-L162

Hm the call to theme('textfield'), seems a bit off to me for D7 usage http://api.drupal.org/api/drupal/includes%21form.inc/function/theme_textfield/7.

I'll see if I can work out a solution for this quick.

Nigel Banks

unread,
May 21, 2013, 4:56:33 PM5/21/13
to island...@googlegroups.com

Peter Murray

unread,
May 21, 2013, 8:25:16 PM5/21/13
to island...@googlegroups.com
That indeed seemed to fix the problem. Many thanks, Nigel; I admire your ability to zoom in on the issue. (I'm not that familiar with the code yet...)


Peter

On May 21, 2013, at 4:56 PM, Nigel Banks <nigel....@gmail.com> wrote:
>
> This should sort it out:
>
> https://github.com/Islandora/islandora_xml_forms/pull/97/files

Reply all
Reply to author
Forward
0 new messages