Hi,

With saving a node I got:

Warning: Invalid argument supplied for foreach() in gmap_taxonomy_get_instances() (line 269 of sites/all/modules/gmap/gmap_taxonomy.module).
Notice: Undefined index: node in gmap_taxonomy_get_instances() (line 269 of sites/all/modules/gmap/gmap_taxonomy.module).

I see this related post: http://drupal.stackexchange.com/questions/60837/notice-undefined-index-n...

And the solution to change to:

if ($field['type'] == 'taxonomy_term_reference' && isset($field['bundles']['node'])) {

Will this be correct?
Greetings, Martijn

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Summit’s picture

Hi,
Yes this worked!
Greetings, Martijn

podarok’s picture

Issue tags: +Needs tests

Can You provide a full how-to-reproduce-a-bug ?

Possibly via /tests/gmap.test file

This should be covered by tests before fixed

Summit’s picture

Hi,
1) I updated my site from D6 to D7
2) I added latest Web Links, Gmap and Location
3) I saved a weblinks node (which was first on D6).

The error occurred multiple times!

Greetings, Martijn

podarok’s picture

#3
we needs much more complicated how-to-reproduce here
We have no any parts of Your configuration for reproduce, just clean install
Can You write a test for make this possible?

TIP: Try /tests/gmap.test in sources repo for example

Summit’s picture

Hi, I am not a programmer and do not know how to make a test.
I just typed in the solution found through google. Sorry.
Greetings, Martijn

kingfisher64’s picture

Used solution on http://drupal.stackexchange.com/a/60844/14527 and this error has disappeared when saving nodes.

Line 268 of gmap_taxonomy_moduel changes from:

if ($field['type'] == 'taxonomy_term_reference') {

to
if ($field['type'] == 'taxonomy_term_reference' && isset($field['bundles']['node'])) {

and no more error messages are displaying. Can this be committed asap?

podarok’s picture

Status: Active » Needs work

#6 please, upload patch with needs review status for review and testing

podarok’s picture

Issue tags: +RTBC for 7.x-2.5

tag for upcoming release

Anonymous’s picture

Issue tags: -RTBC for 7.x-2.5

Thank you for posting this. Fixed the problem for me.

Jerenus’s picture

Jerenus’s picture

Status: Needs work » Needs review
podarok’s picture

Status: Needs review » Fixed

#10 commited pushed to 7.x-2.x
thanks!!!

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