modolabs / Kurogo-Mobile-Web

Kurogo is a PHP framework for delivering high quality, data driven customizable content to a wide range of mobile devices. Its strengths lie in the customizable system that allows you to adapt content from a variety of sources and easily present that to mobile devices from feature phones, to early generation smart phones, to modern devices and tablets
http://kurogo.org
GNU Lesser General Public License v2.1
198 stars 99 forks source link

Map Module Feeds #60

Open bpayst opened 12 years ago

bpayst commented 12 years ago

If you only have one feed configured, when you try to access the list view from a map you receive the following error

Controller class not defined

Fatal error: Uncaught exception 'KurogoConfigurationException' with message 'Controller class not defined' in /var/www/html/lib/DataController.php:293 Stack trace:

0 /var/www/html/lib/Maps.php(118): factory(string, array)

1 /var/www/html/app/modules/map/MapWebModule.php(207): mapModelFromFeedData(array)

2 /var/www/html/app/modules/map/MapWebModule.php(424): getDataModel(string)

3 /var/www/html/app/modules/map/MapWebModule.php(526): assignItemsFromFeed(string)

4 /var/www/html/app/modules/map/MapWebModule.php(978): assignFeeds()

5 /var/www/html/app/modules/map/MapWebModule.php(766): setupGroupPage()

6 /var/www/html/lib/WebModule.php(1439): initializeForPage()

7 /var/www/html/lib/WebModule.php(1544): setPageVariables()

8 /var/www/html/www/index.php(286): displayPage()

9 {main}

thrown in /var/www/html/lib/DataController.php on line 293

sonya commented 12 years ago

thanks. would you mind sharing your config options?

bpayst commented 12 years ago

sure.

feedgroups.ini

[Ops] title = "Conference" center = "38.625891,-90.18782299999999" address = "315 Chestnut Street" description = ""

feeds-Ops.ini

[0] TITLE = "Modo Labs Campus (KMZ, local)" BASE_URL = DATA_DIR"/Modo Labs Test.kmz" CONTROLLER_CLASS = "" RETRIEVER_CLASS = "KMZDataRetriever" SEARCHABLE = 1 DEFAULT_ZOOM_LEVEL = 15 SUBTITLE = "" STATIC_MAP_CLASS = "" JS_MAP_CLASS = ""

(using the modo test one to make sure it wasn't my KML file causing the error)

sonya commented 12 years ago

CONTROLLER_CLASS is set to a blank string in the this config - I'm guessing that's what DataController is choking on. I think it should work if you use

CONTROLLER_CLASS = "MapDataController"

or

MODEL_CLASS = "MapDataModel"

or nothing, i.e., just delete the line that says CONTROLLER_CLASS

This does show that we're not doing enough checking (It looks like we only check for isset and not falsy values). I think MapImageController will blow up in even worse ways if you have blank strings for STATIC_MAP_CLASS and JS_MAP_CLASS.