Exception on certain Maps URLs


#1

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


(Jay Pfaffman) #2

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


#3

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


(Robin Ward) #5

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.


(Jeff Atwood) #6