Problem with designed Plugin and SQL

Hi,

(disclaimer : i am not a native english speaker, please forgive my inescapable language mistakes)

I am designing a plugin for the Omeka web-site of my team witch allow importing files and metadatas to an extern storage plateform, for long term storrage and interoperability purposes.

It work realy fine, but i want to save the access information in my SQL database instead of simply putting them in my code, before relasing it.

My SQL table is just composed of ‘id’, ‘info’, ‘value’. But when i manually put the information in it, i have an error message when the pluging page is loaded (even before trying to get the SQL table).

I present you right here the complet error stack :

  • Fatal error: Uncaught Error: Class ‘MyPlugin’ not found in /sites/mysite/www/web_main/application/libraries/Omeka/Db/Table.php:683
  • Stack trace:
    #0 /sites/mysite/www/web_main/application/libraries/Omeka/Db/Table.php(654): Omeka_Db_Table->recordFromData(Array) #1 /sites/mysite/www/web_main/application/libraries/Omeka/Db/Table.php(228):Omeka_Db_Table->fetchObjects(Object(Omeka_Db_Select))
    #2 /sites/mysite/www/web_main/plugins/MyPlugin/controllers/IndexController.php(19): Omeka_Db_Table->findAll()
    #3 /sites/mysite/www/web_main/application/libraries/Zend/Controller/Action.php(516): MyPlugin_IndexController->indexAction()
    #4 /sites/mysite/www/web_main/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘indexAction’)
    #5 /sites/mysite/www/web_main/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #6 /sites/mysite/www/web_main/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
    #7 /sites/mysite/www/web_main/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run(
    #8 /sites/mysite/www/web_main/application/libraries/Omeka/Application.php(77): Zend_Application->run()
    #9 /sites/mysite/www/web_main/admin/index.php(28): Omeka_Application->run()
    #10 {main} thrown in /sites/mysite/www/web_main/application/libraries/Omeka/Db/Table.php on line 683

If any of you might help, he will diserved to win a full jar of cookies !

Here, the plugin “MyPlugin” is not enabled, but the query wants to access to a table managed by this plugin. So just enable your plugin.

You have to install the table properly as a Zend one. See a simple plugin like SimplePages. Each file should have a standardized name, and the same for the model and the table.

Thank you for responding so fast.

My models files was indeed incomplet (i honestly do not completely understand how Zend work actually).

My bug is not appearing now, hopping the rest of the work will be without any inconvenience.

Thank you sir ! Enjoy your cookie jar and beware of the cookie monster !

This topic was automatically closed after 250 days. New replies are no longer allowed.