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: | support request |
| Priority: | normal |
| Assigned: | jim22 |
| Status: | closed |
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.
#44
#37 is working for me too. But I had to clear my cache before my panels pages were working again.
#45
#37 nailed it for me too
#46
#37 worked for me as well. I just used the Location: Address field which suits my needs; however, in #40 it looks like crutch is saying there may be a problem using other fields; however, in looking at the attached JPG files I cannot see any error occurring. Crutch can you clarify the problem you are seeing with your view? The screen shots look correct to me based on your description, but I might be missing something.
I notice that GMap has a lot of open issues and infrequent releases (no dev build since June). What are the chances of getting this moved into the next Dev build, and when might that be? Should there be a campaign to get more assistance with this module?
#47
#46, that's why I started http://drupal.org/node/608088
#48
...correct it's working for a Node View, but I'm not having any luck trying to utilize a Location View, by creating a View type 'Location' instead of 'Node'. I wrote some short documentation for reference on how to create an aggregate map using Node View and gmap with screenshots.
#49
@crutch
I am not sure if the location view was a working option before this bug was introduced
have you tried it with views 2.6, maybe it deserves its own bug report !!
#50
Subscribing
#51
http://drupal.org/cvs?commit=296290
#623234: Fix gmap style plugin for Views 2.7.
Also, fix a warning caused by neglecting to give the row plugin a chance to query.
Additionally, ensure that views knows we are capable of doing grouping.
The fix is based on the changes presented in #619884 for views.
#52
Thanks Brandon!
#53
Great ! Thanks to all.
#54
This worked for me as well... however, when I enabled pin clustering (Jef Poskanzer's clusterer), the content disappears again. Anyone have any ideas of what might be happening?
#55
Oops... seems this issue has been identified and resolved elsewhere:
http://drupal.org/node/329281#comment-1920180
#56
The patch in #37 works great for node location views, Any fix yet for user location views?
#57
anyone installed 2.8 ? is the problem still showing in views mode?
#58
@madaerodog
if you download the dev version of Gmap works with views 2.8 (this patch was committed as per #51 and hence not needed)
#59
@jbluto
Using the current gmap 6.x-1.x-dev works for location views too.
#60
@squares:
After installing the latest dev version all my results dissapear.
So i see no markers at all any more.
I have Gmap configured with Martin Pearman's ClusterMarker
Once i choose for No manager (use GMap API directly) the markers this time with info information appear again.
I'll check the issue you mentioned........
#61
patch in #37 works for me.
Views 6.x-2.8
Gmap 6.x-1.1-rc1
#62
latest dev fixes this for me.
#63
@jonowindsurf
use the latest dev version instead fixes this issue
#64
Which dev release? Tried http://drupal.org/node/95786 with no luck, now working with http://ftp.drupal.org/files/projects/gmap-6.x-1.1-rc1.tar.gz with views 2.8 and am still experiencing the same problem, the fields aren't being populated into the gmap on-page javascript data.
UPDATE: With the #37 patch applied to the rc1 release it works.
#65
The latest gmap-6.x-1.x-dev from 2009-12-12 works for me with Views 2.8
#66
> Which dev release?
>
Dev releases aren't versioned, so when the poster writes "latest dev worked for me", that means the dev release that was current when the post was made.
#67
I appreciate that dev releases are not versioned that's why I included the date 2009-12-12. Yes, that was also the latest dev at the time I posted but it might not have been if another was released while I was testing it and doing other things. I hope that helps.
Izzy
#68
#37 patch worked for me. thanks so much!
#69
Hi all,
I tried solution #1 and it did not work for me. Regarding applying patches, I don't have a local host version of my website. Thus, I am not sure about how to implement those.
So far, I tried and spent a great amount of time trying to sort it out but to no avail.
I downloaded and implemented the latest gmap dev module. And I am using Views 2.7. So, not sure what to do now.
Any help more than welcome
Tafa
#70
@tafa - Have you tried it with Views 2.8 ?
#71
#69 you can download views locally to your computer and patch the files there and then ftp them to your host. if you have windows it's a little harder but with mac or linux it's pretty straight forward. just google how to apply a patch locally.
#72
Yes, I tried views 2.8 and i got it working. However, whenever I try to set the gmap focus on a world map, i always go back to the drupal marker where i entered my location. So, views 2.8 sorted the matter at hand. But I ended up with another issue I now have to tackle. Thanks anyway for the reply.
T
#73
Automatically closed -- issue fixed for 2 weeks with no activity.
#74
I am seeing, I think, something like this issue with Views 6.x-2.8 and GMap 6.x-1.1-rc1. I've got a node view. With a row style of fields, no field values are displayed in bubbles. If I change the row style to Semantic Views: Fields (from Semantic Views 6.x-1.0-beta1), I do get my data in the bubbles. That works for me, but the issue apparently does still exist with the vanilla fields row style, so it may still bite some people.
#75
Might Gmap 1.1 appear shortly, w fix for this issue?
If so, I'll wait for this; might be better than using dev version - I've seen advice to effect that shouldn't use dev versions, as might include stuff that later gets removed, maybe leading to trouble.
#76
there is no guarantee of when 1.1 will be out
this particular module has been in dev for more than a year if I recall correctly
try it if it works for you just keep it !!
#77
I did notice it's been over a year since 1.0; had seen a dev dated 10 Jan, so wondered if might be big progress with 1.1 imminent.
But yes, maybe I should just go for the dev version
Update (20 Jan): installed latest dev, which looks to be from 10 Jan, and indeed works.
#78
I've tried both #1 (#2) and #37 patches and I'm still getting an empty Gmap info window (bubble). My markers and map are showing up correctly, but just an empty info window. I have tested the "/map/node" Gmap webpage and the info window (bubble) shows the fields just fine. So, I guess it's a miscommunication between Views and Gmap. Any advice?
I'm using:
Drupal 6.15
Views 6.x-2.x-dev (downloaded Jan 18th, 2010) (I tried multiple versions of Views, with no luck.)
Gmap 6.x-1.0 ( I also tried to install Gmap latest dev version )
Thanks for any help.
#79
Jim if you read the thread clearly the issue has been fixed and lots of people tested it
Thus, use the dev version and follow the instructions of people that have succeeded
if your settings are different from all above and you get no bubble displaying it might indeed be a bug but you have to give more information in order for someone to follow it and solve it (my guess it would probably have to go in different issue ...)
Thus closing this issue ...
#80
I tried #74 and set "Row Style" to "Semantic Views: Fields" and it works!
Thanks for the help.
#81
Hi,
I have the same problem. I am building a views style plugin and recently I installed views 2.8 version and marker info window is showing only label, and the content is empty.
I found from the #2 patch that the line $this->view->row_index = 0; is not necessary because it is already set later by views. The line $this->view->row_index++; is misleading, because at the end of the function render_fields in views_plugin_style.inc, variable row_index is unset, so that the ++ line implicitly declares a new variable and sets it to 1.
In my case, everything worked fine for all but the first row in the result set. The solution I found is to replace the unset() function in render_fields method in the views_plugin_style.inc with the following line $this->view->row_index = 0;
I hope this helps!
#82
Hi,
I have this issue also. I have tried all of the above fixes with no luck. I am using the latest GMap dev module with views 2.8.
Thanks for any help!
JP Levac
#83
Found fix for above issue. Need to path the location module: http://drupal.org/node/382778
Hope this helps!
JP Levac
#84
#85
levacjeep at comment #83, what are you talking about? There is no patch mentioned there.
That report is over 6 months old and doesn't seem related at all. Plus the one bit of code change mentioned is immediately shot down by bdragon.
So what did you use as a solution??
#86
Yes, I also think this issue has been resolved for some time, see #65 albeit using dev versions and it was appropriately closed.
Further discussion on this thread is confusing as some people are not comfortable with dev modules and Drupal 6 is currently tackling a number of features and issues with a number of modules that may be used together.
It would be great to see a new recommended release of Gmap; 6.x-1.1-rc1 is 11 months old and there have been a number of bug fixes and features. Maybe it would be helpful to have a separate thread on the need for Gmap 6.x-1.2 to be released as soon as possible?
#87
I'm using views 6.x-2.8 and the info window shows titles only, no info. I'm also displaying the map as an attachment to another view. How can I get the info to show up?