Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#10 | gmap-undefined_index_in_gmap_taxonomy_get_instances-1928812-10.patch | 1.02 KB | Jerenus |
Comments
Comment #1
Summit CreditAttribution: Summit commentedHi,
Yes this worked!
Greetings, Martijn
Comment #2
podarokCan You provide a full how-to-reproduce-a-bug ?
Possibly via /tests/gmap.test file
This should be covered by tests before fixed
Comment #3
Summit CreditAttribution: Summit commentedHi,
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
Comment #4
podarok#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
Comment #5
Summit CreditAttribution: Summit commentedHi, 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
Comment #6
kingfisher64 CreditAttribution: kingfisher64 commentedUsed 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?
Comment #7
podarok#6 please, upload patch with needs review status for review and testing
Comment #8
podaroktag for upcoming release
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedThank you for posting this. Fixed the problem for me.
Comment #10
Jerenus CreditAttribution: Jerenus commentedPatch.
Comment #11
Jerenus CreditAttribution: Jerenus commentedComment #12
podarok#10 commited pushed to 7.x-2.x
thanks!!!