Closed (fixed)
Project:
OpenLayers Geocoder
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2011 at 20:53 UTC
Updated:
5 Aug 2012 at 20:51 UTC
$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
Comment #1
kle commentedsubscribing...
Comment #2
joeysantiago commentedsubscribing...
the problem looks like happening when using locale, have you noticed the same behaviour?
Comment #3
sweetchuckI have enabled locale module too.
I yet dont try without locale module.
Comment #4
kle commentedIn function openlayers_geocoder_widget() on the last lines I commented out this line:
// unset($field['widget']['description']);Until now it works well...
Comment #5
steinmb commentedUnable 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:
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.Comment #6
steinmb commented#1238650: strlen() expects parameter 1 to be string, array given in (...)includes/bootstrap.inc line 891 is a duplicate issue of this
Comment #7
steinmb commentedDestroying 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.