Can't add items

Hello,

I’ve worked with Omeka many times in the past, and am trying to set up a new instance on a hosting server I haven’t worked with before (Doteasy). I had some troubles installing, but they upgraded my PHP version and the install worked, but I still cannot add items (this problem was happening before and after the PHP version change).

When I go to add an item, instead of completing successfully it says Omeka has encountered an error. In the error log, there is this:
[26-Sep-2019 15:31:20 UTC] PHP Warning: array_keys() expects parameter 1 to be array, boolean given in /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Db/Table.php on line 133
[26-Sep-2019 15:31:20 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Db/Table.php on line 389
[26-Sep-2019 15:31:20 UTC] PHP Warning: array_keys() expects parameter 1 to be array, boolean given in /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Db/Table.php on line 133
[26-Sep-2019 15:31:20 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Db/Table.php on line 366

Does anyone have ideas on why this is happening? I imagine it has to do with my database, but I went through a script installer (Softaculous) and it should’ve set it up for me. I’m hesitant to mess with it; I don’t really have other server support on this project.

Thanks!

Christine

Can you let us know what version of Omeka you’re running?

Hi,

We’re running version 2.7.

Thanks!

Can you post more of the log? Or is that all the messages there are?

Also, what actually happens if you try to add an item? An error page or message? If so, what does it say?

That’s all the messages there are. It’s repeated twice because I tried to add an item twice, so I just posted one of the sections.

It gives me a page “Omeka has encountered an error.” I tried to edit the .htacess file and turn on error logging, and though I’ve never had an issue with that in the past, it for some reason breaks the whole installation when I uncomment the dev environment line (it gives me a 500 internal error until I comment it out again). So I was just going by the error log.

Hmm, that’s odd… an “encountered an error” page should lead to an error message in the PHP logs.

Well, anyway, If the “error display” instructions won’t work, try the “Activate Error Logging” instructions instead. Omeka has its own separate log you can turn on that should include the message that goes with that page.

Thanks for this advice. I made this change and did a test - it seems I can add an item with no attached files. But for items with attached files, it gives me an error. Here is the message in the error log:

2019-10-01T14:37:32+00:00 WARN (4): Omeka_Storage_Adapter_Filesystem: Tried to delete missing file ‘original/984304c2bf32e393aaca1a0f9ee1271d.png’.
2019-10-01T14:37:32+00:00 ERR (3): exception ‘Omeka_File_Derivative_Exception’ with message ‘Failed to execute command: ‘/usr/bin/convert’ ‘/tmp/984304c2bf32e393aaca1a0f9ee1271d.png[0]’ -auto-orient -background white +repage -flatten -thumbnail ‘800x800>’ ‘/tmp/fullsize_984304c2bf32e393aaca1a0f9ee1271d.jpg’.’ in /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php:210
Stack trace:
#0 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php(48): Omeka_File_Derivative_Strategy_ExternalImageMagick::executeCommand(’’/usr/bin/conve…’, NULL, NULL, NULL)
#1 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/File/Derivative/Creator.php(76): Omeka_File_Derivative_Strategy_ExternalImageMagick->createImage(’/tmp/984304c2bf…’, ‘/tmp/fullsize_9…’, ‘fullsize’, 800, ‘image/png’)
#2 /home/ilovemat9936/public_html/dev/omeka/application/models/File.php(356): Omeka_File_Derivative_Creator->create(’/tmp/984304c2bf…’, ‘984304c2bf32e39…’, ‘image/png’)
#3 /home/ilovemat9936/public_html/dev/omeka/application/models/Job/FileProcessUpload.php(22): File->createDerivatives()
#4 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Job/Dispatcher/Adapter/Synchronous.php(25): Job_FileProcessUpload->perform()
#5 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Job/Dispatcher/Default.php(137): Omeka_Job_Dispatcher_Adapter_Synchronous->send(’{“className”:"J…’, Array)
#6 /home/ilovemat9936/public_html/dev/omeka/application/models/File.php(203): Omeka_Job_Dispatcher_Default->send(‘Job_FileProcess…’, Array)
#7 [internal function]: File->afterSave(Array)
#8 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Record/AbstractRecord.php(280): call_user_func(Array, Array)
#9 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Record/AbstractRecord.php(548): Omeka_Record_AbstractRecord->runCallbacks(‘afterSave’, Array)
#10 /home/ilovemat9936/public_html/dev/omeka/application/models/Item.php(336): Omeka_Record_AbstractRecord->save()
#11 /home/ilovemat9936/public_html/dev/omeka/application/models/Item.php(249): Item->saveFiles()
#12 [internal function]: Item->afterSave(Array)
#13 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Record/AbstractRecord.php(280): call_user_func(Array, Array)
#14 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Record/AbstractRecord.php(548): Omeka_Record_AbstractRecord->runCallbacks(‘afterSave’, Array)
#15 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Controller/AbstractActionController.php(188): Omeka_Record_AbstractRecord->save(false)
#16 /home/ilovemat9936/public_html/dev/omeka/application/controllers/ItemsController.php(148): Omeka_Controller_AbstractActionController->addAction()
#17 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Zend/Controller/Action.php(516): ItemsController->addAction()
#18 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘addAction’)
#19 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#20 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#21 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#22 /home/ilovemat9936/public_html/dev/omeka/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#23 /home/ilovemat9936/public_html/dev/omeka/admin/index.php(28): Omeka_Application->run()
#24 {main}

That error is just saying Omeka couldn’t run the ImageMagick process to create thumbnails… I’d check that ImageMagick is installed on the server they switched you to, that it’s at the same location, and that they haven’t disabled the proc_open PHP function which we use to run that command from PHP.