Gmap plugin style gmap.
Individual marker based on the Marker Field setting is not showing. Fallback marker is used and showing.
Neither Content: Title or Content: Nid are working.

I have the views plugin field set to nid.
$marker_field = field_nid but there is no corresponding key=>value pair in the $row array. So the marker name never gets set.

245   elseif ($this->options['markers'] == 'field') {
246
247           if (!empty($row->{$marker_field}) && !empty($row->{$marker_field}[0]['raw']['value'])) {
248          $markername = $row->{$marker_field}[0]['raw']['value'];
249            }
250          }
CommentFileSizeAuthor
#9 marker_handling_use-2125493-9.patch1.13 KBValentine94
PASSED: [[SimpleTest]]: [MySQL] 145 pass(es). View
#6 gmap_plugin_style_gmap.inc_.patch1020 bytesedward.radau
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch gmap_plugin_style_gmap.inc__3.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

jeffwpetersen’s picture

Issue summary: View changes

$markername
$markername = $row->{'nid'};

jeffwpetersen’s picture

Issue summary: View changes
podarok’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
Status: Active » Patch (to be ported)

good to see here patch in git diff format http://drupal.org/patch against latest dev

jeffwpetersen’s picture

Title: Marker Handling - Use marker field - not showing markers for fields » Marker Handling - Use marker field - not showing markers for default cck fields

Any cck field that starts with FIELD_ is working. default cck fields ie: TITLE, NID are not.
I was not able to create a fix for this issue.

edward.radau’s picture

I believe I'm running into the same or similar issue. Except instead of Content: Nid or Content: Title I'm trying to utilize the Content: Type field. And because of this the $markerfield is set as "field_type" however in that piece of the code above the only attribute the $row object has that is relevant to this comparison would be "node_type". So, the condition fails and my custom marker is not being set the way I'd like it to.

I also tried to get around it using a PHPCode field however, similar situation. It's being set as "field_php" when the desired result I want it to be compared to is listed as "views_php_9" in the $row object.

edward.radau’s picture

FileSize
1020 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch gmap_plugin_style_gmap.inc__3.patch. Unable to apply patch. See the log in the details link for more information. View

I've made some modifications that fixed my particular issue. I removed a few references such as the !empty($row->{$marker_field}[0]['raw']['value'] because in my situation there was no array here but a string and the condition failed every time. I also opted to use field_alias instead of alias because that is exactly what I needed and there was never a situation where a value of field_(alias name) existed as far as I could tell. I can't think of any situations where this would break but it's always safe to test.

Valentine94’s picture

Status: Patch (to be ported) » Needs review

Trigger bot to test.

Status: Needs review » Needs work

The last submitted patch, 6: gmap_plugin_style_gmap.inc_.patch, failed testing.

Valentine94’s picture

Status: Needs work » Needs review
FileSize
1.13 KB
PASSED: [[SimpleTest]]: [MySQL] 145 pass(es). View

Re-roll of #6.

podarok’s picture

Status: Needs review » Fixed

#9 commited
Thanks!

  • podarok committed de71dda on 7.x-2.x authored by Valentine94
    Issue #2125493 by edward.radau, Valentine94: Marker Handling - Use...

Status: Fixed » Closed (fixed)

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