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

atomicjeep - November 4, 2009 - 15:05

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

atomicjeep - November 4, 2009 - 15:13

Attached is a patch, first time trying to create one...

AttachmentSize
gmap.patch 556 bytes

#3

dougzilla - November 4, 2009 - 21:04

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

smeyer56 - November 5, 2009 - 14:48

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

agorry - November 4, 2009 - 23:27
Version:6.x-1.1-rc1» 6.x-1.x-dev

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

smeyer56 - November 5, 2009 - 15:01

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

timlie - November 6, 2009 - 16:07

Can confirm this issue, also reverted views to 2.6 at this moment

#8

srobert72 - November 6, 2009 - 21:03

Subscribing !

#9

srobert72 - November 6, 2009 - 21:44

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

srobert72 - November 7, 2009 - 20:36

I confirm #4 :

My pins are placed properly and the info window shows data but half of the data is in the info window.

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

seoscout - November 8, 2009 - 19:06

confirmed! works! again! yeah ;-) i went crazy over this bug ;-)

#12

kbk - November 9, 2009 - 14:52
Title:Views 2.7 - breaks field output» Views 2.7 - breaks field output - GMap marker doesn't display correctly

I've edited the issue title to make it more apparent which problem is addressed by this post. Thanks for this!

#13

TravisCarden - November 9, 2009 - 17:34

subscribing

#14

mikesir87 - November 9, 2009 - 19:36

subscribing

#15

srobert72 - November 10, 2009 - 17:06

I reply to my previous comment #10
Today all works perfectly, all data are displayed in my info window.

#16

Bartezz - November 11, 2009 - 20:43

subscribe

#17

madaerodog - November 12, 2009 - 08:41

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

sja1 - November 12, 2009 - 09:25
Priority:normal» critical
Status:active» reviewed & tested by the community

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

mikesir87 - November 12, 2009 - 13:54

Any idea on when the next release might be?

#20

Nathaniel - November 12, 2009 - 20:27

Subscribe

#21

izmeez - November 12, 2009 - 20:31

subscribe.

#22

tinem - November 13, 2009 - 06:12

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

tinem - November 13, 2009 - 06:18

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

el56 - November 13, 2009 - 16:12

subscribe.

This happened to my sites as well.

#25

bdragon - November 13, 2009 - 19:48

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

snicers - November 14, 2009 - 11:21

Subscribe

#27

Remco - November 16, 2009 - 10:30

Subscribe

#28

held69 - November 16, 2009 - 13:15

subscribe

#29

jlmeredith - November 17, 2009 - 00:12

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

daresbalat - November 17, 2009 - 12:48

Code changes at #1 worked for me also.

#31

DanielJohnston - November 17, 2009 - 14:56

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

skyredwang - November 17, 2009 - 15:38

#1 or #2 works

#33

Rastik - November 18, 2009 - 00:40

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

pauldawg - November 18, 2009 - 05:53

Subscribing to this.

#35

skyredwang - November 18, 2009 - 16:06
Status:reviewed & tested by the community» needs work

#31 #33 are saying the patch creates another problem

#36

DanielJohnston - November 18, 2009 - 16:10

@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

GiorgosK - November 18, 2009 - 16:17
Title:Views 2.7 - breaks field output - GMap marker doesn't display correctly» Views 2.7 - breaks field output - GMap marker info window (bubble) doesn't display fields correctly
Status:needs work» needs review

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

AttachmentSize
623234_gmap_views_marker_info_window.patch 737 bytes

#38

malcomio - November 21, 2009 - 14:30

#37 works fine, thanks

#39

Jim Kirkpatrick - November 23, 2009 - 20:26
Status:needs review» reviewed & tested by the community

#37 works for me to, updating issue. Thanks GiorgosK + everyone who worked on this.

#40

crutch - November 24, 2009 - 03:30

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

crutch - November 24, 2009 - 03:39

Attachments for #40

AttachmentSize
capture-view-gmap.JPG 77.35 KB
capture-view-gmap-view.JPG 114.31 KB

#42

rooby - November 26, 2009 - 01:04

The patch in #37 fixes the problem for me (for a node view).

#43

davidhunt - November 26, 2009 - 07:32

#37 works for me as well. Thanks, and subscribing in case anything new comes up.

#44

cronix - November 27, 2009 - 11:40

#37 is working for me too. But I had to clear my cache before my panels pages were working again.

#45

Dave.Ingram - November 27, 2009 - 15:05

#37 nailed it for me too

#46

pauldawg - November 27, 2009 - 16:39

#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

cronix - November 27, 2009 - 23:38

#46, that's why I started http://drupal.org/node/608088

#48

crutch - November 28, 2009 - 01:49

...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

GiorgosK - November 28, 2009 - 07:48

@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

Intertextual - November 30, 2009 - 06:32

Subscribing

#51

bdragon - December 1, 2009 - 16:11
Status:reviewed & tested by the community» fixed

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

pauldawg - December 1, 2009 - 17:38

Thanks Brandon!

#53

nrosell - December 2, 2009 - 14:15

Great ! Thanks to all.

#54

squares - December 3, 2009 - 19:32

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

squares - December 3, 2009 - 19:43

Oops... seems this issue has been identified and resolved elsewhere:

http://drupal.org/node/329281#comment-1920180

#56

jbluto - December 4, 2009 - 21:22

The patch in #37 works great for node location views, Any fix yet for user location views?

#57

madaerodog - December 8, 2009 - 16:02

anyone installed 2.8 ? is the problem still showing in views mode?

#58

GiorgosK - December 8, 2009 - 17:31

@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

rooby - December 9, 2009 - 09:57

@jbluto
Using the current gmap 6.x-1.x-dev works for location views too.

#60

held69 - December 10, 2009 - 12:54

@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

jonowindsurf - December 11, 2009 - 08:47

patch in #37 works for me.
Views 6.x-2.8
Gmap 6.x-1.1-rc1

#62

nemchenk - December 11, 2009 - 10:34

latest dev fixes this for me.

#63

GiorgosK - December 11, 2009 - 13:36

@jonowindsurf
use the latest dev version instead fixes this issue

#64

jcamfield - December 13, 2009 - 17:42

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

izmeez - December 13, 2009 - 22:48

The latest gmap-6.x-1.x-dev from 2009-12-12 works for me with Views 2.8

#66

nemchenk - December 14, 2009 - 09:54

> 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

izmeez - December 14, 2009 - 18:24

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

treebykooba - December 18, 2009 - 00:06

#37 patch worked for me. thanks so much!

#69

Tafa - December 20, 2009 - 20:08

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

izmeez - December 21, 2009 - 06:44

@tafa - Have you tried it with Views 2.8 ?

#71

treebykooba - December 22, 2009 - 20:42

#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

Tafa - December 24, 2009 - 23:03

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

System Message - January 7, 2010 - 23:10
Status:fixed» closed

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

#74

topherb - January 14, 2010 - 18:02

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

DocMartin - January 17, 2010 - 10:43

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

GiorgosK - January 17, 2010 - 11:53

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

DocMartin - January 20, 2010 - 02:52

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

jim22 - January 19, 2010 - 15:12
Category:bug report» support request
Priority:critical» normal
Assigned to:Anonymous» jim22
Status:closed» active

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

GiorgosK - January 19, 2010 - 18:38
Status:active» closed

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

jim22 - January 20, 2010 - 20:47

I tried #74 and set "Row Style" to "Semantic Views: Fields" and it works!

Thanks for the help.

#81

srakas - January 25, 2010 - 15:41

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

levacjeep - January 26, 2010 - 20:24
Status:closed» active

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

AttachmentSize
Screen shot 2010-01-26 at 3.18.36 PM.png 79.69 KB
Screen shot 2010-01-26 at 3.18.52 PM.png 178.22 KB

#83

levacjeep - January 26, 2010 - 21:48

Found fix for above issue. Need to path the location module: http://drupal.org/node/382778

Hope this helps!
JP Levac

#84

levacjeep - January 26, 2010 - 21:48
Status:active» closed

#85

totsubo - February 4, 2010 - 11:37

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

izmeez - February 4, 2010 - 17:20

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

rcharamella - February 8, 2010 - 19:57

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?

 
 

Drupal is a registered trademark of Dries Buytaert.