Exception on certain Maps URLs

AI-generated summary

The discussion is about an exception occurring when trying to onebox certain Google Maps URLs. glebm provided an example URL that triggers the error. According to glebm, the error occurs when the onebox attempts to parse the URL but fails. The error message is ActionView::Template::Error: odd number of arguments for Hash. eviltrout fixed an issue with parsing query parameters in the onebox gem, but the specific URL in question still doesn’t work because it’s missing the required ll parameter for the location.

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

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

That’s right

It tries to onebox it but fails with this exception:

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

3 Mi Piace

There was an error with parsing the query parameters in the onebox gem. I fixed it in the gem 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.

5 Mi Piace