jweiland-net / maps2

This TYPO3 extension enables you to implement Google Maps on your website.
GNU General Public License v2.0
13 stars 16 forks source link

findPositionByAddress exception #13

Closed schloram closed 7 years ago

schloram commented 7 years ago

Hi @froemken, when I add an event with your extension events2 + maps2 and the address isn't found (Google Maps GeoCode API returns with an error) the PHP error is a little bit too confusing for a backend editor. Especially when you are in production context there isn't a proper message at all. ("Oops an error occured") A backend editor will never know what went wrong. (/Classes/Utility/GeocodeUtility.php:90)

Is it possible to add an error message as flash message that doesn't lock the screen with an PHP error but instead prevents saving the record and shows a modest flash message with something like Address ' Bagshot Row 1 0123 Hobbiton Middle-earth' not found. Please check your entries at the top?

Thanks!

froemken commented 7 years ago

Hello @schloram ,

solved on current master. No Exception will be thrown anymore. The user will get a FleshMessage typ Warning. If you activate TYPO3_CONF_VARS['BE']['debug'] = 1 you will get additional information in the lower debugger console (DebugUtility)

I hope that would be OK for you.

Stefan