This may be related to the latest drupal core update 6.24. It seems just after I did the update, my node markers wouldn't update when I edited their taxonomy. It turns out, $node->taxonomy structure has changed (at least, gmap_taxonomy_nodeapi doesn't handle it correctly anymore). Also, I don't know how to build a patch if anyone wants to help out. To function probably needs to be rewritten properly in order to be understood, but here's the minimum amount of changes you need to make it just work. These changes are in the "gmap_taxonomy.module" file.
First, change line 134 from...
if (isset($status[$voc]) && $status[$voc]) {
to...
if (isset($status[$terms->vid]) && $status[$terms->vid]) {
Then comment out lines 135 thru 139 like so:
/*$t = $terms;
if (!is_array($t)) {
$t = array($t);
}
foreach ($t as $term) {*/
...and also comment out the closure for the above "foreach" on line 144 like so:
//}
This seems to work fine with the new structure of $node->taxonomy that is in place as of Drupal 6.24. Enjoy!
Comment | File | Size | Author |
---|---|---|---|
#11 | gmap-taxonomy-term-markers-1443146-11.patch | 1.17 KB | izmeez |
Comments
Comment #1
dunx CreditAttribution: dunx commentedAlso change:
$result = db_query('SELECT marker, tid FROM {gmap_taxonomy_term} WHERE tid = %d', $term);
To:
$result = db_query('SELECT marker, tid FROM {gmap_taxonomy_term} WHERE tid = %d', $terms->tid);
Comment #2
izmeez CreditAttribution: izmeez commentedDoes anyone have these changes in a patch for testing?
Thanks.
Comment #3
dunx CreditAttribution: dunx commentedI've never done a patch as they scare me :|
It's a relatively easy and contained change to one script though, so shouldn't be tricky for somebody to put together.
But, this is a fix because of a new "feature" in core Taxonomy, so it's not 100% clear where they'll go with that.
Comment #4
eiland CreditAttribution: eiland commentedAre you sure? I still get http://tinyurl.com/6wbz3o4 after having the following diff:
Comment #5
dunx CreditAttribution: dunx commentedAm I sure about what? Link looks fine, but I don't know what it's supposed to look like :)
Comment #6
eiland CreditAttribution: eiland commentedAll items are of the same category and are supposed to be blue. However, recently a few orange pins showed up.
Comment #7
eiland CreditAttribution: eiland commentedAll items are in the same category and are supposed to have the same blue marker, but since recently there are a few which pop up with an orange marker. I thought that that was what this issue was about?
Comment #8
eiland CreditAttribution: eiland commentedsorry drupal was down i didnt see i already got through.
Comment #9
dunx CreditAttribution: dunx commentedPerhaps start by seeing what marker is stored in the gmap_taxonomy_node table.
I've not had any issues since I updated my gmap_taxonomy.module, but my site is in dev and data is not very dynamic. May be some action is resetting something or your orange markers are new/old/modified or something that's revealing an issue. I'll keep an eye on things and feed back if I spot anything odd.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedafter applying updates in this thread:
Parse error: syntax error, unexpected T_CASE in gmap_taxonomy.module on line 154
solution:
delete extra } from line 147
Comment #11
izmeez CreditAttribution: izmeez commentedok, i have made a patch based on the above comments against the latest 6.x-1.x-dev and tested that it applies:-) However, I don't see any noticeable change. Gmap markers are still default color not based on taxonomy term.
Let me know if I goofed on the patch. Thanks.
Comment #12
izmeez CreditAttribution: izmeez commentedsorry, I forgot to change the status.
Comment #13
izmeez CreditAttribution: izmeez commentedbtw, looking at gmap_taxonomy.views.inc and it has table joins
makes me wonder if
Try to improve performance and eliminate duplicates caused by node_access table joins may come into play as people have described it helping with other bugs.
Comment #14
izmeez CreditAttribution: izmeez commentedwill this also require updates to gmap_taxonomy.install that would also execute on update.php?
Comment #15
semajnitram CreditAttribution: semajnitram commentedJust wanted to know if anyone has got any further with this issue? I've been trying to get taxonomy terms markers to show on a map but it simply isn't working on my setup. I've tried in a test environment and it works great, but on my production site, it doesn't work. Im stumped on what's stopping it working.
Comment #16
dpintats CreditAttribution: dpintats commentedsubscribing
Comment #17
matt2000 CreditAttribution: matt2000 commentedThis is a duplicate of #205944: gmap marker settings - assigning terms and displaying different markers based on these in a gmap view map. The patch in Comment 35 there is an improved version of the one above,