Corrections plugin - troubleshooting

Hello. We are running a site and are trying to implement the Corrections plugin. It is not working.

It seems there are two parts to the problem:

PART ONE
When we test the '‘corrections’ link on our item page - when viewing our public site on a ‘normal’ browser (not logged into admin) - our server displays a “This page isn’t working virtualcollections.ced.berkeley.edu is currently unable to handle this request. HTTP ERROR 500”

Yet, When we test the ‘corrections’ link on our item page - when logged into omeka admin in the same browser - the corrections form appears.

PART TWO
When I fill out the corrections form with some test data, and hit submit, we get an omeka error. The error log reads as follows:

2017-05-03T17:04:21-06:00 ERR (3): exception ‘Omeka_Record_Exception’ with message ‘Cannot find an element with an ID of ‘4’!’ in /home/virtualcollect/public_html/application/models/Mixin/ElementText.php:312
Stack trace:
#0 /home/virtualcollect/public_html/application/models/Mixin/ElementText.php(508): Mixin_ElementText->getElementById(4)
#1 /home/virtualcollect/public_html/application/models/Mixin/ElementText.php(473): Mixin_ElementText->_getElementTextsToSaveFromPost(Object(ArrayObject))
#2 [internal function]: Mixin_ElementText->beforeSaveElements(Object(ArrayObject))
#3 /home/virtualcollect/public_html/application/libraries/Omeka/Record/AbstractRecord.php(251): call_user_func_array(Array, Array)
#4 /home/virtualcollect/public_html/application/libraries/Omeka/Record/AbstractRecord.php(210): Omeka_Record_AbstractRecord->delegateToMixins(‘beforeSaveEleme…’, Array)
#5 /home/virtualcollect/public_html/plugins/Corrections/models/CorrectionsCorrection.php(53): Omeka_Record_AbstractRecord->__call(‘beforeSaveEleme…’, Array)
#6 /home/virtualcollect/public_html/plugins/Corrections/models/CorrectionsCorrection.php(53): CorrectionsCorrection->beforeSaveElements(Object(ArrayObject))
#7 [internal function]: CorrectionsCorrection->beforeSave(Array)
#8 /home/virtualcollect/public_html/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#9 /home/virtualcollect/public_html/application/libraries/Omeka/Record/AbstractRecord.php(531): Omeka_Record_AbstractRecord->runCallbacks(‘beforeSave’, Array)
#10 /home/virtualcollect/public_html/application/libraries/Omeka/Controller/AbstractActionController.php(188): Omeka_Record_AbstractRecord->save(false)
#11 /home/virtualcollect/public_html/plugins/Corrections/controllers/IndexController.php(30): Omeka_Controller_AbstractActionController->addAction()
#12 /home/virtualcollect/public_html/application/libraries/Zend/Controller/Action.php(516): Corrections_IndexController->addAction()
#13 /home/virtualcollect/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘addAction’)
#14 /home/virtualcollect/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#15 /home/virtualcollect/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#16 /home/virtualcollect/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#17 /home/virtualcollect/public_html/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#18 /home/virtualcollect/public_html/index.php(23): Omeka_Application->run()
#19 {main}

I did not build this site and am not a server admin yet have been tasked with making this work.
Thank you for your help in pointing me towards a solution.

I’m definitely seeing problems, too. What version of Omeka are you using? It could be that I need to update the plugin for newer Omeka versions.

Also, this isn’t documented, but the plugin assumes that Captcha has been set up under Omeka’s security settings. That might be involved in part one of the problems.

Thanks Patrick, we are running version 2.4.1
I do not know if we have Captcha set up. I will look into that and post back.

Hello, so I implemented Captcha and that seems to solve one of the issues - as we stand now the corrections form appears to public users. Thank you!

However, upon submitting a correction, Omeka still throws an error, and it looks like it is similar to the error log I posted yesterday. Today’s error reads (without the trace):
2017-05-04T10:59:48-06:00 ERR (3): exception ‘Omeka_Record_Exception’ with message ‘Cannot find an element with an ID of ‘4’!’ in /home/virtualcollect/public_html/application/models/Mixin/ElementText.php:312

That looks like there’s a metadata element that Corrections thinks is there, but actually isn’t.

Sometimes this can happen if there is Item Type metadata, or some other metadata element that doesn’t apply to all items. Maybe scan through the correctable elements configured for Corrections, and see if those all apply to all the items.

Thanks - I’ll compare the elements we have chosen to those that actually exist in the items in question.

Hi Patrick - I think your suggestion was correct. We compared the ‘corrections’ elements to the elements we used in our items, and made sure that only those that appear in the items were checked in the ‘corrections’ configuration. It seems to be working well now.

Thank you for your pointers on these two issues!

cheers- jason

Hi there!

First, thanks a lot for this plugin which matches exactly the goal of the project I am working on!
Just a question though, what if I want users to correct fields which are specific to an item type such as “Birth Date” for item type “Person” for example? Do you have any idea of how to get round this issue?

Thanks in advance,

Alice

I’m pretty sure that, from the above discussion, this is a bug that I’ll have to fix in the code. I’m hoping it’ll be a simple one.