Error Message

Hi, I'm having trouble uploading content to a site powered by Omeka. I keep getting the error message copied below. I've tried contacting an administrator at the outside site, but they haven't gotten back to me. Any suggestions?
Thanks!
Kayla

Omeka has encountered an error

Zend_Db_Statement_Mysqli_Exception
Mysqli statement execute error : Column 'public' cannot be null

Backtrace

exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Column 'public' cannot be null' in /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Zend/Db/Statement/Mysqli.php:214
Stack trace:
#0 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Zend/Db/Statement.php(300): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('? INSERT...', Array)
#3 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Omeka/Db.php(84): call_user_func_array(Array, Array)
#4 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Omeka/Db.php(298): Omeka_Db->__call('query', Array)
#5 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Omeka/Db.php(298): Omeka_Db->query('? INSERT...', Array)
#6 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Omeka/Db.php(268): Omeka_Db->exec('? INSERT...', Array)
#7 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Omeka/Record.php(553): Omeka_Db->insert('ContributionCon...', Array)
#8 /mnt/isilon/hosted_sites/home/hadthesis/web/plugins/Contribution/controllers/ContributionController.php(262): Omeka_Record->save()
#9 /mnt/isilon/hosted_sites/home/hadthesis/web/plugins/Contribution/controllers/ContributionController.php(177): Contribution_ContributionController->_linkItemToContributor(Object(Item), Object(ContributionContributor), Array)
#10 /mnt/isilon/hosted_sites/home/hadthesis/web/plugins/Contribution/controllers/ContributionController.php(31): Contribution_ContributionController->_processForm(Array)
#11 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Zend/Controller/Action.php(513): Contribution_ContributionController->contributeAction()
#12 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('contributeActio...')
#13 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#14 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#15 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#16 /mnt/isilon/hosted_sites/home/hadthesis/web/application/libraries/Omeka/Core.php(166): Zend_Application->run()
#17 /mnt/isilon/hosted_sites/home/hadthesis/web/index.php(30): Omeka_Core->run()
#18 {main}

Something seems amiss with the Contribution plugin. Could you say what version of Omeka and the Contribution plugin you are using?

This happens if you remove the public check box (labelled "Publish my contribution on the web.") from the contribute view (plugins/Contribution/views/public/contribution/contribute.php).

If you do not want the check box shown, change it to a hidden HTML form field instead of removing it.

The same applies to the anonymous check box (labelled "Contribute anonymously.").

Can you more specifically tell me what to change in this bit of code for my site:
<div class="inputs">
<?php $public = isset($_POST['contribution-public']) ? $_POST['contribution-public'] : 0; ?>
<?php echo $this->formCheckbox('contribution-public', $public, null, array('1', '0')); ?>
<?php echo $this->formLabel('contribution-public', __('Publish my contribution on the web.')); ?>
</div>

I'm not quite sure what you are asking about. Are you getting the same error message at the top of this (fairly outdated) thread?

And, what exactly are you aiming to achieve?

I'd like to get rid of the Publish my contribution on the web checkbox.

Instead of

<?php echo $this->formCheckbox('contribution-public', $public, null, array('1', '0')); ?>

try

<?php echo $this->formHidden('contribution-public', 1); ?>

That'll make everything contributed set public. If you want them not to be set public, use 0 instead of 1.

Then also delete the line echoing formLabel.