contribution plug update

I tried installing the Contribution plugin but on the plugin page it says I should update it. I had not installed an earlier version so I don't know why it says to update it. I installed version 3.0.3 I have Omeka 2.3. When I click the update button for Contribution it returns the following error:

Zend_Db_Statement_Mysqli_Exception

Mysqli statement execute error : Unknown column 'contributor_posting' in 'omeka_contribution_contributed_items'

followed by:

exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Unknown column 'contributor_posting' in 'omeka_contribution_contributed_items'' in /home/kknoerl/themua.org/collections/application/libraries/Zend/Db/Statement/Mysqli.php:214
Stack trace:
#0 /home/kknoerl/themua.org/collections/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/kknoerl/themua.org/collections/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('? ...')
#3 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#4 /home/kknoerl/themua.org/collections/plugins/Contribution/ContributionPlugin.php(218): Omeka_Db->__call('query', Array)
#5 /home/kknoerl/themua.org/collections/plugins/Contribution/ContributionPlugin.php(218): Omeka_Db->query('? ...')
#6 [internal function]: ContributionPlugin->hookUpgrade(Array)
#7 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Plugin/Broker.php(145): call_user_func(Array, Array)
#8 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Plugin/Installer.php(99): Omeka_Plugin_Broker->callHook('upgrade', Array, Object(Plugin))
#9 /home/kknoerl/themua.org/collections/application/controllers/PluginsController.php(237): Omeka_Plugin_Installer->upgrade(Object(Plugin))
#10 /home/kknoerl/themua.org/collections/application/libraries/Zend/Controller/Action.php(516): PluginsController->upgradeAction()
#11 /home/kknoerl/themua.org/collections/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('upgradeAction')
#12 /home/kknoerl/themua.org/collections/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#13 /home/kknoerl/themua.org/collections/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#14 /home/kknoerl/themua.org/collections/application/libraries/Zend/Application.php(382): Zend_Application_Bootstrap_Bootstrap->run()
#15 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#16 /home/kknoerl/themua.org/collections/admin/index.php(28): Omeka_Application->run()
#17 {main}

If you "install" a plugin and Omeka tells you to upgrade it, that means you had it installed before and deleted the plugin files without uninstalling it.

It's possible that you instead have remnants of an old database or something similar and that's where your problems are coming from... I'm not sure. If you want to start fresh you could manually drop all the omeka_contribution tables and remove the Contribution row from the omeka_plugins table.

Thanks for your reply John. I'm not entirely comfortable trying to mess around with the database. I'm very much a newbie. I think I was mistaken in my first post in that a long time ago I tried to install the contribution plugin but it didn't work then either so I probably did delete it without uninstalling hence leading to my issues now. Would trying to revert to an old version and then uninstalling it work or would that just make a bigger mess?

Hard to tell. Do you know how long ago you tried to install the plugin, and what version of Omeka you tried to install it on?

I just looked at the list of plugins on my system information screen and it lists Contribution as version 2.2.1 rather than the 3.0.3 that I attempted to load the other day. Totally guessing here but I suspect I tried to install that older version with a more recent version of Omeka. I've only upgraded Omeka twice in the last few years but the last upgrade was within the last year. Contribution didn't work before and I got busy with other things (which is why I probably forgot I even tried to do it) so I just deleted it.

I could try to reload that old version and see if I can then delete it. I just don't want to screw up the database.

That might work, but keep in mind that reloading the old version and uninstalling it would delete all the data there, so you'll want to make a call about what data should and should not be kept.

Also, just to double-check, are you working from the Contribution plugin that RRCHNM released, or one of the various forks of it that are available on GitHub? I ask because the error seems to refer to a column that I can't yet find in any of RRCHNM's releases.

There shouldn't be any data because it never worked in the past. As to whether or not it was a GitHub or RRCHNM release I haven't the foggiest. All I know is that the revision number is 2.2.1

I highly doubt I downloaded a plugin from any other website than RRCHNM so I would guess it's not GitHub. I'll give it reloading the old one a try.

Well....that made all of Omeka crash. I couldn't even log in once I put the Old Contribution folder back in Plugins. I took it out and can now log back into Omeka (phew...).

Fatal error: Call to a member function loadResourceList() on a non-object in /home/kknoerl/themua.org/collections/plugins/Contribution/ContributionPlugin.php on line 220

Ah. That's a mismatch between that version of the plugin and how more recent versions of Omeka work.

I _think_ the following approach will work.

Instead of putting the latest version of Contribution in, grab version 3.0 from the download page and put that in. I'm pretty sure that that's new enough to not cause the Fatal error you just got, but old enough to not cause the original issue you reported.

If that works, uninstall the plugin to get rid of the tables.

Then, put the 3.0.3 version back in and try installing it.

Unfortunately that didn't work. After I put Contribution 3.0 into the plugin folder I logged into Omeka and it asked me to upgrade to 3.0 There was no uninstall option. I clicked upgrade but then received this message:

Omeka has encountered an error
Zend_Db_Statement_Mysqli_Exception

Mysqli statement execute error : Prepared statement needs to be re-prepared

exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Prepared statement needs to be re-prepared' in /home/kknoerl/themua.org/collections/application/libraries/Zend/Db/Statement/Mysqli.php:214
Stack trace:
#0 /home/kknoerl/themua.org/collections/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/kknoerl/themua.org/collections/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 /home/kknoerl/themua.org/collections/application/libraries/Zend/Db/Adapter/Abstract.php(756): Zend_Db_Adapter_Abstract->query(Object(Omeka_Db_Select), Array)
#3 [internal function]: Zend_Db_Adapter_Abstract->fetchRow(Object(Omeka_Db_Select), Array)
#4 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#5 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Db/Table.php(670): Omeka_Db->__call('fetchRow', Array)
#6 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Db/Table.php(670): Omeka_Db->fetchRow(Object(Omeka_Db_Select), Array)
#7 /home/kknoerl/themua.org/collections/application/models/Table/Plugin.php(49): Omeka_Db_Table->fetchObject(Object(Omeka_Db_Select), Array)
#8 /home/kknoerl/themua.org/collections/application/libraries/globals.php(859): Table_Plugin->findByDirectoryName('UserProfiles')
#9 /home/kknoerl/themua.org/collections/plugins/Contribution/ContributionPlugin.php(74): plugin_is_active('UserProfiles')
#10 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Plugin/Loader.php(380): ContributionPlugin->setUp()
#11 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Plugin/Loader.php(217): Omeka_Plugin_Loader->_loadPluginBootstrap(Object(Plugin))
#12 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Plugin/Installer.php(91): Omeka_Plugin_Loader->load(Object(Plugin), true)
#13 /home/kknoerl/themua.org/collections/application/controllers/PluginsController.php(237): Omeka_Plugin_Installer->upgrade(Object(Plugin))
#14 /home/kknoerl/themua.org/collections/application/libraries/Zend/Controller/Action.php(516): PluginsController->upgradeAction()
#15 /home/kknoerl/themua.org/collections/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('upgradeAction')
#16 /home/kknoerl/themua.org/collections/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#17 /home/kknoerl/themua.org/collections/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#18 /home/kknoerl/themua.org/collections/application/libraries/Zend/Application.php(382): Zend_Application_Bootstrap_Bootstrap->run()
#19 /home/kknoerl/themua.org/collections/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#20 /home/kknoerl/themua.org/collections/admin/index.php(28): Omeka_Application->run()
#21 {main}

I dug around a little on my Dreamhost server and I was able to see the tables so I "think" I could try John's first suggestion about dropping the contribution tables and removing the one line from the plugins table.

That appears to have worked. I was able to removed the old contribution tables and line from the plugin table. I uploaded Contribution 3.0.3 and clicked install and it says it was successfully installed. Thank you to everyone that offered suggestions. I do appreciate it.

Has anyone had any trouble getting email alerts to work? I set up the plugins and had an outside user contribute an image and a document. It prompted them to create a guest user account which worked fine. They uploaded the two items and received an acknowledgment via email. The only thing that didn't work is that I didn't get a notification email despite having entered my address in the New Contribution Notification Emails box.

Sometimes your hosting requires that the email address sending be [user]@yourdomain. I know that Dreamhost does this - I had to change the admin email on one site to be my redirect email for that domain name to get them to work.

Thanks Megan, I checked that and I'm using an email address on that server from that domain.

Does it redirect? Maybe it got eaten by a spam filter? You can also check your hosting's maildir to see if it ended up there

Nope. No luck so far. I'll keep checking but everything seems to be set up correctly. This is the only issue I've found so far with the Contributions plugin.