$field['widget']['description'] is NULL in content_field_form(): line 102
preg_match() expects parameter 2 to be string, array given in /.../includes/bootstrap.inc on line 896.
Empty string is valid for the t() function, but if a NULL value given, it return with an array.

I dont know how is possible, but the 'description' key is not exists if the widget is openlayer_geocoder.

Comments

kle’s picture

subscribing...

joeysantiago’s picture

subscribing...
the problem looks like happening when using locale, have you noticed the same behaviour?

sweetchuck’s picture

I have enabled locale module too.
I yet dont try without locale module.

kle’s picture

In function openlayers_geocoder_widget() on the last lines I commented out this line:
// unset($field['widget']['description']);

Until now it works well...

steinmb’s picture

Status: Active » Postponed (maintainer needs more info)

Unable to recreate this bug. Care to give me more info on how trigger it?
GIT tell me that the removal of the description is coming from #1001372: Help text displays in wrong place

Edit: Managed to recreate it:

  • Add a help text
  • Enable locale
  • Add a extra language
  • Change default language to something else then English.
  • Edit node or content type with geocoder widget active and

warning: preg_match() expects parameter 2 to be string, array given in /Users/steinmb/htdocs/sites/openlayers_geocoder/drupal/includes/bootstrap.inc on line 899.

steinmb’s picture

Status: Postponed (maintainer needs more info) » Fixed

Destroying the field description is not a good idea. It is req. by CCK content_field_form(). If we not want the help text to show up two places could we do <?php $field['widget']['description']) = ''; ?>

While we discuss this when I ahead and committed http://drupalcode.org/project/openlayers_geocoder.git/commit/d4bd363 what remove the removal of the description (heh, liked the sound of that), then I personally do not have any usability problem with it does pop up two places.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.