I'm trying to display custom text on my markers so I create a view. Everything seems to work (I only have 1 location set up so far). I then go in to change a setting in the gmap format on the view, save everything, reload the view and that is where the errors occur. Instead of the map showing up I get the following error:

    Notice: Trying to get property of non-object in gmap_plugin_style_gmap->render() (line 166 of /home/j4moreap/public_html/navydiverolympics.com/sites/all/modules/gmap/gmap_plugin_style_gmap.inc).
    Notice: Trying to get property of non-object in gmap_plugin_style_gmap->render() (line 167 of /home/j4moreap/public_html/navydiverolympics.com/sites/all/modules/gmap/gmap_plugin_style_gmap.inc).

I then go back into the views gmap format settings thinking I broke something and see that I have an extra Grouping field Nr.1, except with each new entry the next number is append (2,3,4, etc). This seems to happen every time I reload the view. Am I doing something wrong or has anyone else gotten this error?

Comments

chemicalroman’s picture

Reverting to Views 7.x-3.0 solved the issue for me. That way i can keep working until there's a fix.

nsummy’s picture

Thanks for the input. So do you think this is a bug with Views or Gmap?

chemicalroman’s picture

Well, I have no idea. Let's hope some expert takes a look at this issue.

paulrooney’s picture

StatusFileSize
new36.16 KB

I have seen this as well with 7.x-1.x-dev.

If you open the Map: Style options dialogue () and click the apply button, the next time you open the the Map: Style options dialogue there will be another Grouping field Nr. listed, and the view will not be displayed.

A rather clunky workaround is this:

Change the Format from GMap to Grid, and click Apply.

Then click on the format again and change it back to GMap. All of the extra Grouping fields will be gone. You can then select any other options in that dialogue and Apply them, and the view will work.

So from what I can see, the problem only occurs when you edit the Format settings more than once after setting the Format to GMap.

paulrooney’s picture

Duplication of Grouping fields is also reported in Views jQFX » Issues
See: Views Style Settings: Duplicated Grouping Field
http://drupal.org/node/1426644

nclavaud’s picture

subscribing.

same problem here with
Views 7.x-3.1 + GMap 7.x-1.x-dev

terbs’s picture

Subscribing

webbykat’s picture

Same problem here. I'd like to try reverting to 7.x-3.0 as suggested in comment #1, to see if that will allow me to keep working until a fix is in place. I can't figure out how to go backwards though. 3.0 isn't listed at http://drupal.org/project/views.

Has this worked for anyone else, and if so, how did you revert?

Edit: Found it - "View all releases" at the bottom of the project page. And yes, it fixed the problem for me.

haiiro.shimeji’s picture

Status: Active » Needs review
StatusFileSize
new672 bytes

I have the same problem, and make a patch code.

The empty grouping setting is ignored in views_plugin_style::options_validate(), but this behavior was override by gmap_plugin_style_gmap::options_validate()..

To solve the problem, apply this patch and submit the gmap style settings form once more.

haiiro.shimeji’s picture

StatusFileSize
new1.35 KB

There is the same problem in gmap_expanded plugin.

zach harkey’s picture

Status: Needs review » Closed (duplicate)

+1 I can confirm that the patch from #10 works!

This patch also solves #1124724: Error result page from creating page from Gmap view

zach harkey’s picture

Status: Closed (duplicate) » Needs review

Sorry, I meant to close #1124724 as the duplicate. Redirecting that thread here.

dollar_dad’s picture

Component: Miscellaneous » User interface
Category: support » bug
Status: Needs review » Reviewed & tested by the community

#10. Error_using_with_views-1425448-10.patch - Confirm that this patch works - thanks

zabelc’s picture

I'll also confirm that the patch above works.

I did have to toggle the view format to something else and back to GMap in order to get rid of the extra grouping fields though

opdavies’s picture

The patch in #10 works for me also.

haiiro.shimeji’s picture

Thanks for your testing.

I'd like to push the change to git repository, but I can't.
Can anyone help me?

$ git co 7.x-1.x
$ git apply [the patch]
$ git commit -a
$ git push http://haiiro.shimeji@git.drupal.org/project/gmap.git 7.x-1.x

Then I was asked my password and entered, but git returns the following error.

error: Cannot access URL http://haiiro.shimeji@git.drupal.org/project/gmap.git/, return code 22

Is some setup required?

Thanks.

opdavies’s picture

The push command seems wrong. It should be:

git push -u remoterepo localrepo

Probably:

git push -u origin 7.x-1.x

If you do git branch -v then you can see what your local and remote repositories are named as.

Assuming that you have access to push to this project...

opdavies’s picture

haiiro.shimeji’s picture

Thanks for your reply.

I tryed the following command..

$ git remote set-url origin ssh://haiiro.shimeji@git.drupal.org/project/gmap.git
$ git push -u origin 7.x-1.x
fatal: remote error: User 'haiiro.shimeji' does not have write permissions for repository 'gmap'

I wonder I have a fundamental misunderstanding..
Is authority for writting required??

opdavies’s picture

Yes, someone with write access to the repository needs to push it. :)

haiiro.shimeji’s picture

I understand.
Thanks for you help..

zach harkey’s picture

Priority: Normal » Major

I'm raising the priority to major because a) this is a major issue that breaks Views integration, and b) we have a fix that's been reviewed and tested. We have to make sure this gets committed.

opdavies’s picture

Agreed! :)

hongquan’s picture

Thanks

hongquan’s picture

The bug occurs again, despite of the patch.

opdavies’s picture

It worked OK for me. Have you submitted the Gmap style settings form again after applying the patch?

zabelc’s picture

@hongquan try clearing your caches a couple times & try toggling the view format to something else and back to GMap in order to get rid of the extra grouping fields though

pandersb’s picture

subscribing

bdragon’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 7.x-2.x-dev via haiiro.shimeji's branch and cherry picked to 7.x-1.x, thanks!

Status: Fixed » Closed (fixed)

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

pxantom’s picture

Version: 7.x-1.x-dev » 7.x-2.6
Status: Closed (fixed) » Active

Hi,
I'm using 7.x-2.6 and this issue still there.
Also I have errors like following:
Notice: Undefined index: value in function gmap_plugin_style_gmap->render() (line 224 in file /var/www/[sitename]/sites/all/modules/gmap/gmap_plugin_style_gmap.inc).

podarok’s picture

Version: 7.x-2.6 » 7.x-2.x-dev

#31 looks like follow-up issue for Undefined index
Also try latest dev for this