Views 2.7 - breaks field output - GMap marker info window (bubble) doesn't display fields correctly
atomicjeep - November 4, 2009 - 14:44
| Project: | GMap Module |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
No fields values are rendered with the 2.7 release of Views (Markers are rendered correctly though), it mentions a re-ordering of field rendering:
--SNIP--
Note: Views 2.7 contains some rearrangment of the order of field rendering. While I didn't see any errors or hear of any errors due to this, it may affect some external style plugins. If you have a problem with how fields render and are using a non Views-core style, please doublecheck with the 'table' or 'unformatted' styles and see if the problem persists. If it does not, it may well be the style provided by a module.
---
I don't know enough about Views to fix it but I'm having a go - with little success so far!

#1
Update: Adding the following lines fixes this issues
in the file: gmap_plugin_style_gmap.inc
Insert $this->view->row_index = 0; after $output = ''; on line 96
Then below $offsets[$markername]++; add this: $this->view->row_index++;
#2
Attached is a patch, first time trying to create one...
#3
I can confirm this.
An update of views to 2.7 results in a map view with the pins properly placed but the resulting info window showing empty fields. It will show the labels, but the fields are empty.
#4
I can confirm this as well. The patch works .... sort of. My pins are placed properly and the info window shows data but half of the data is in the info window.
Thanks for your work on this AtomicJeep.
#5
I see what dougzilla sees with either 6.x-1.1-rc1 or 6.x-1.x-dev combined with Views 2.7. For now I've devolved to Views 2.6 for production sites. Ditto thx to atomicjeep for working on the patch!
#6
agorry,
I am fairly new to Druapl and haven't had to devolve any modules yet. Is this as easy as copying Views 2.6 over Views 2.7 or do I have to run update afterwards and pick a version of views to update/devolve to.
Thanks
#7
Can confirm this issue, also reverted views to 2.6 at this moment
#8
Subscribing !
#9
The patch works.
I'm using Views 6.x-2.x-dev (2009-Nov-03) which is globally same as Views 6.x-2.7
#10
I confirm #4 :
I should have 2 texte lines and a picture in my info window.
But only texte appear and no picture.
Patch provided in #2 solved only a part of this issue.
#11
confirmed! works! again! yeah ;-) i went crazy over this bug ;-)
#12
I've edited the issue title to make it more apparent which problem is addressed by this post. Thanks for this!
#13
subscribing
#14
subscribing
#15
I reply to my previous comment #10
Today all works perfectly, all data are displayed in my info window.
#16
subscribe
#17
so the safe solution for now is to revert to views 2.6? If I don't want to test patches on a production server?
#18
Thanks to all involved! I've also tested this, and it's working for me. changing status to reviewd & tested, and also bumping priority to critical, as it's serious enough that it needs to be fixed before full release of this module.
#19
Any idea on when the next release might be?
#20
Subscribe
#21
subscribe.
#22
I have the same problem http://www.tinemuller.dk/drupal/Crime and don't know how to use a Patch?
I tried installing Views 2.6 but no matter what I do it still shows vers. 2.7 on the http://www.tinemuller.dk/drupal/admin/reports/updates. When I click check manually I get this error message and don't know if this could be the problem? I have Flush all cache and update.php.
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: index.php
If you think this is a server error, please contact the webmaster.
Error 500
www.tinemuller.dk
Fri Nov 13 07:11:50 2009
Apache/2.2.3 (Debian)
#23
I have the same problem http://www.tinemuller.dk/drupal/Crime and don't know how to use a Patch?
I tried installing Views 2.6 but no matter what I do it still shows vers. 2.7 on the http://www.tinemuller.dk/drupal/admin/reports/updates. When I click check manually I get this error message and don't know if this could be the problem? I have Flush all cache and update.php.
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: index.php
If you think this is a server error, please contact the webmaster.
Error 500
www.tinemuller.dk
Fri Nov 13 07:11:50 2009
Apache/2.2.3 (Debian)
#24
subscribe.
This happened to my sites as well.
#25
Acknowledging the problem.
I don't have access to my working copy on this machine so I can't test it, but am aware of the issue.
#26
Subscribe
#27
Subscribe
#28
subscribe
#29
The patch at #2 does not appear to work, but the code changes at #1 did work for me.
Using Views 6.x-3.0-alpha1 and Gmap 6.x-1.1-rc1.
#30
Code changes at #1 worked for me also.
#31
The suggestion in #1 and patch in #2 presented an entirely different issue once in place: all pins on the map are now showing details for the wrong nodes. Examination of the node information shows that the nodes themselves are correctly geocoded, and the pins themselves appear in the correct places, but clicking on a pin causes a bubble to appear with completely the wrong node information on it. I'm going to try dropping down to Views 2.6 until this is resolved.
#32
#1 or #2 works
#33
I was in the same situation as #31 after applying the fix from #1. Pins were in place, but content inside a pin's bubble didn't correspond to it's position on the map. I fixed it with a slight modification of solution from #1 - don't append "$this->view->row_index++;" right after "$offsets[$markername]++;", but instead after the next line, which is just "}".
This works for me, because my map (deliberately) contains items that have no location set (and therefore aren't shown on the map). Incrementing the row_index right after the line from #1 means it's still within the "if (!empty($lat) && !empty($lon)) { ... }" fragment and therefore only executed on rows that have location set. Moving it out of the if clause (i.e. pasting it one line below) fixed the issue for me.
#34
Subscribing to this.
#35
#31 #33 are saying the patch creates another problem
#36
@Rastik #33 and skyredwang #35 - suggested solution in #33 worked fine for me. Thanks! Patch needs to be rerolled to move the second insertion down by a line.
#37
Good catch Rastik (comment#33) here is the patch against the 6.x-1.x-dev from 2009-Jun-09
previous solution only works when all nodes filtered by view have latitude/longitude data you are advised to use this instead
Run this patch from your root drupal directory
#38
#37 works fine, thanks
#39
#37 works for me to, updating issue. Thanks GiorgosK + everyone who worked on this.
#40
subscribe
-----
Works when building a Node View. No success with Location View attempts.
D6.14
GMap 6.x-1.x-dev
Location 6.x-3.x-dev
Views 3 alpha
Applied patch at #37
---
-A view has to be created by choosing type, Node.
-Add fields for the view that will be shown in the marker bubble.
-Add a Filter, by Node: Type. (prior step of creating custom Content Type with Location data capture active. Example content type: Client Location)
-Choose Style: GMap
-Change GMap style settings
--Add desired Macro - minimum - [gmap]
--Data Source: Location.module (Choose Lat and Long doesn't find Lat and Long from location entry on custom content type)
--Marker Handling: Single
--Marker Type: make choice
-Update
Save
-Add Display - Page
-Edit Path
-Add URL to where we can view the page
-Update
Save
View Page
#41
Attachments for #40
#42
The patch in #37 fixes the problem for me (for a node view).
#43
#37 works for me as well. Thanks, and subscribing in case anything new comes up.