# Exception on certain Maps URLs

**URL:** https://meta.discourse.org/t/exception-on-certain-maps-urls/65218
**Category:** Bug
**Created:** [June 27, 2017, 6:17pm UTC](https://meta.discourse.org/t/exception-on-certain-maps-urls/65218 "2017-06-27T18:17:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![glebm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/glebm/32/120891_2.png) [@glebm](https://meta.discourse.org/u/glebm)
#### Post date: [June 27, 2017, 6:17pm UTC](https://meta.discourse.org/t/exception-on-certain-maps-urls/65218/1 "2017-06-27T18:17:17Z")

</div>

Example:

[http://maps.google.com/maps?hl=en&sugexp=eqn,fixedpos%3Dfalse,boost\_normal%3D40,boost\_high%3D40,cconf%3D0.95,min\_length%3D2,rate\_low%3D0.015,rate\_high%3D0.015&cp=12&gs\_id=aa&xhr=t&bav=on.2,or.r\_gc.r\_pw.r\_qf.,cf.osb&biw=1280&bih=681&q=pigeon+forge&um=1&ie=UTF-8&hq=&hnear=0x885bff0da7e6bdcb:0x1770c0708e28804e,Pigeon+Forge,+TN&gl=us&ei=cS-8T5feHOWJ6gHLl6w9&sa=X&oi=local\_group&ct=image&sqi=2&ved=0CMoBELYD](http://maps.google.com/maps?hl=en&sugexp=eqn,fixedpos%3Dfalse,boost_normal%3D40,boost_high%3D40,cconf%3D0.95,min_length%3D2,rate_low%3D0.015,rate_high%3D0.015&cp=12&gs_id=aa&xhr=t&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&biw=1280&bih=681&q=pigeon+forge&um=1&ie=UTF-8&hq=&hnear=0x885bff0da7e6bdcb:0x1770c0708e28804e,Pigeon+Forge,+TN&gl=us&ei=cS-8T5feHOWJ6gHLl6w9&sa=X&oi=local_group&ct=image&sqi=2&ved=0CMoBELYD)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 27, 2017, 6:55pm UTC](https://meta.discourse.org/t/exception-on-certain-maps-urls/65218/2 "2017-06-27T18:55:04Z")

</div>

Are you saying that you expect this to be a onebox but isn’t?

---

<div class="post-metadata">

### Author: ![glebm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/glebm/32/120891_2.png) [@glebm](https://meta.discourse.org/u/glebm)
#### Post date: [June 27, 2017, 7:17pm UTC](https://meta.discourse.org/t/exception-on-certain-maps-urls/65218/3 "2017-06-27T19:17:17Z")

</div>

That’s right

It tries to onebox it but fails with this exception:

```plaintext
ActionView::Template::Error: odd number of arguments for Hash

/gems/onebox-1.8.11/lib/onebox/engine/google_maps_onebox.rb:122 in []
/gems/onebox-1.8.11/lib/onebox/engine/google_maps_onebox.rb:122 in resolve_url!
/gems/onebox-1.8.11/lib/onebox/engine/google_maps_onebox.rb:41 in initialize
/gems/onebox-1.8.11/lib/onebox/preview.rb:71 in new
/gems/onebox-1.8.11/lib/onebox/preview.rb:71 in engine
/gems/onebox-1.8.11/lib/onebox/preview.rb:15 in to_s

```

Originally reported here: [Exception when using certain Google Map URLS · Issue #598 · thredded/thredded · GitHub](https://github.com/thredded/thredded/issues/598)

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [June 27, 2017, 8:06pm UTC](https://meta.discourse.org/t/exception-on-certain-maps-urls/65218/5 "2017-06-27T20:06:09Z")

</div>

There was an error with parsing the query parameters in the onebox gem. I fixed it in [the gem](https://github.com/discourse/onebox/commit/544c493471afdc0d86318abb970cfcc733bb85df) but unfortunately there’s still an error with that URL, since it doesn’t seem to have the `ll` parameter for the location that the Google Maps oneboxer requires.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [November 11, 2017, 10:33am UTC](https://meta.discourse.org/t/exception-on-certain-maps-urls/65218/6 "2017-11-11T10:33:07Z")

</div>


