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

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.

 
 

Drupal is a registered trademark of Dries Buytaert.