After updating from beta2 to beta3, I received the following error on my /map display:

Undefined variable: bubbletext_field_obj in gmap_plugin_style_gmap->render() (line 251 of /home/institut/public_html/drupal7/sites/all/modules/gmap/gmap_plugin_style_gmap.inc)

Any help to resolve this is appreciated. Thank you.

Comments

kurtismccartney’s picture

Title: Error after updating to 1.0-beta3 » Error after updating to -beta3

Confirmed experiencing the same issue on another upgrade today. Anyone have an issue downgrading or find a quick fix?

Update: Quick fix for reporting ~ comment out line 251 and 260 in the offending file.

tchase’s picture

Title: Error after updating to -beta3 » Error after updating to 1.0-beta3
wayne57’s picture

Title: Error after updating to -beta3 » Error after updating to 1.0-beta3
Priority: Normal » Major

I can confirm I am experiencing the same problem. Has anyone got a solution to this issue? The warning appears on the site to all users and is not just admin pages so is pretty major bug. I think it may be getting an argument from the location module but not sure?

seanmrafferty’s picture

I commented out lines 251-253. I can't find anywhere else in the code where $bubbletext_field_obj exists. Also, the whole if..elseif statement seems pointless. Both conditions result in the same exact result: $bubbletext = $this->rendered_fields[$row_index][$this->options['bubbletextfield']];

Basically, just comment out the elseif clause.

podarok’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Status: Active » Needs work
Issue tags: +Needs tests

tag

podarok’s picture

updated release info http://drupal.org/node/1910748

johnv’s picture

Title: Error after updating to 1.0-beta3 » Warning "Undefined variable: bubbletext_field_obj in gmap_plugin_style_gmap->render()"

better title.

johnv’s picture

Priority: Major » Minor

This is not major: you can hide all messages from the user, and only log them in Watchdog.

podarok’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Category: bug » task
Priority: Minor » Normal
Status: Needs work » Postponed (maintainer needs more info)

it`s critical task if it is still actual for latest dev, cause it will broke simpletest (after covering this part of code)
Please, check it against latest dev and tell us status

podarok’s picture

I`ll appreciate if You upload here Your views export data

anawillem’s picture

This isn't my original issue, but in order to move things along, here's a shot at a view throwing this error:

$view = new view();
$view->name = 'user_maps';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'users';
$view->human_name = 'User Maps';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Map';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access user profiles';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '1';
$handler->display->display_options['style_plugin'] = 'gmap';
$handler->display->display_options['style_options']['macro'] = '[gmap |zoom=15|control=Small|width=210px|height=300px] ]';
$handler->display->display_options['style_options']['markertype'] = 'small red';
$handler->display->display_options['style_options']['latfield'] = 'name';
$handler->display->display_options['style_options']['lonfield'] = 'name';
$handler->display->display_options['style_options']['markerfield'] = 'name';
$handler->display->display_options['style_options']['enablermt'] = 0;
$handler->display->display_options['style_options']['rmtfield'] = 'name';
$handler->display->display_options['style_options']['center_on_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['highlight_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['autoclick_on_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['tooltipfield'] = 'name';
$handler->display->display_options['style_options']['bubbletextenabled'] = 1;
$handler->display->display_options['style_options']['bubbletextfield'] = 'name';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: User: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'users';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['label'] = '';
$handler->display->display_options['fields']['name']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['name']['alter']['ellipsis'] = FALSE;
/* Field: Location: Address */
$handler->display->display_options['fields']['address']['id'] = 'address';
$handler->display->display_options['fields']['address']['table'] = 'location';
$handler->display->display_options['fields']['address']['field'] = 'address';
$handler->display->display_options['fields']['address']['label'] = '';
$handler->display->display_options['fields']['address']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['address']['hide'] = array(
  'name' => 0,
  'street' => 0,
  'additional' => 0,
  'city' => 0,
  'province' => 0,
  'postal_code' => 0,
  'country' => 0,
  'locpick' => 0,
  'phone' => 0,
  'province_name' => 0,
  'country_name' => 0,
  'map_link' => 0,
  'coords' => 0,
);
/* Sort criterion: User: Created date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'users';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: User: Uid */
$handler->display->display_options['arguments']['uid']['id'] = 'uid';
$handler->display->display_options['arguments']['uid']['table'] = 'users';
$handler->display->display_options['arguments']['uid']['field'] = 'uid';
$handler->display->display_options['arguments']['uid']['default_action'] = 'default';
$handler->display->display_options['arguments']['uid']['default_argument_type'] = 'user';
$handler->display->display_options['arguments']['uid']['default_argument_options']['user'] = FALSE;
$handler->display->display_options['arguments']['uid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['uid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['uid']['summary_options']['items_per_page'] = '25';
/* Filter criterion: User: Active */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'users';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;

/* Display: 210x300 */
$handler = $view->new_display('block', '210x300', 'block');
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'gmap';
$handler->display->display_options['style_options']['macro'] = '[gmap |zoom=15|control=Small|width=210px|height=300px] ';
$handler->display->display_options['style_options']['markertype'] = 'small red';
$handler->display->display_options['style_options']['latfield'] = 'name';
$handler->display->display_options['style_options']['lonfield'] = 'name';
$handler->display->display_options['style_options']['markerfield'] = 'name';
$handler->display->display_options['style_options']['enablermt'] = 0;
$handler->display->display_options['style_options']['rmtfield'] = 'name';
$handler->display->display_options['style_options']['center_on_nodearg'] = 1;
$handler->display->display_options['style_options']['center_on_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['highlight_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['autoclick_on_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['tooltipfield'] = 'name';
$handler->display->display_options['style_options']['bubbletextenabled'] = 1;
$handler->display->display_options['style_options']['bubbletextfield'] = 'address';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['block_description'] = 'map:210x300';

/* Display: 150x210 */
$handler = $view->new_display('block', '150x210', 'block_1');
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'gmap';
$handler->display->display_options['style_options']['macro'] = '[gmap |zoom=15|control=Small|width=150px|height=210px] ]';
$handler->display->display_options['style_options']['markertype'] = 'small red';
$handler->display->display_options['style_options']['latfield'] = 'name';
$handler->display->display_options['style_options']['lonfield'] = 'name';
$handler->display->display_options['style_options']['markerfield'] = 'name';
$handler->display->display_options['style_options']['enablermt'] = 0;
$handler->display->display_options['style_options']['rmtfield'] = 'name';
$handler->display->display_options['style_options']['center_on_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['highlight_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['autoclick_on_nodearg_arg'] = 'uid';
$handler->display->display_options['style_options']['tooltipfield'] = 'name';
$handler->display->display_options['style_options']['bubbletextenabled'] = 1;
$handler->display->display_options['style_options']['bubbletextfield'] = 'name';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['defaults']['row_options'] = FALSE;
anawillem’s picture

incidentally, what i also notice is that the 'bubble' text, although it is designated to come only from the 'location' field in the settings configuration, is actually exposing all 'visible' fields in the field list instead... don't know if that will help...

greggmarshall’s picture

We are seeing the same issue. A little extra data is we have two fields defined in the view, title and body. If we put the title into the bubble, no errors. If we put the body into the bubble, errors. We rearranged the order of the fields and did a rewrite to include both the title and body in the title field (which we needed anyway) and we can display both without errors.

lunazoid’s picture

Thanks for the tip, greggmarshall! I took a similar route, adding a title field and body field. The title was set to link to the content, and both were excluded from display. I added another title field, and rewrote the output to display the first (excluded) title and the body. Added this to the popup, and I get the results I want without the errors.

m4olivei’s picture

Issue summary: View changes
StatusFileSize
new816 bytes

Hello,

This is still an issue in the latest 7.x-2.9. Attached is a patch against the latest dev version. After briefly reviewing the commit logs, this seems to be a case of some changes that happened at some point where this bit should have been cleaned up but was missed. The patch is very simple, it just remove the offending if clause as suggested in #4.

Thanks,
Matt

m4olivei’s picture

Assigned: Unassigned » m4olivei
Status: Postponed (maintainer needs more info) » Needs review

Updating to Needs Review to get eyes on the patch and get it committed. Let me know if anything is needed.

Thanks,
Matt

podarok’s picture

Status: Needs review » Fixed

#16 commited to 7.x-2.x
Thanks!

  • Commit 17943f2 on 7.x-2.x authored by m4olivei, committed by podarok:
    Issue #1912168 by m4olivei | tchase: Warning "Undefined variable:...

Status: Fixed » Closed (fixed)

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