Error after deleting sideloaded files

Hi all,

I used File Sideload to add media to several items I was ingesting with CSV Import. Unfortunately those items failed to be created (since they lacked some required fields) but all of the files sideloaded to the media directory “public_html/collection/files.” To clear up space I went into cPanel on Reclaim and deleted the files myself.

Unfortunately, now I am getting “Omeka S encountered an error.” Is there anything I can do to rectify this?

Thanks for the assistance!

Just deleting files in the “files” directory shouldn’t cause this problem, so something else is likely going on.

Try following the “Display Error Details” instructions from this page of the Omeka S manual to get a more detailed error message that should tell you what the problem is.

Brilliant, thank you!

That helped me pinpoint something with the Sharing module. I disabled it and the error is gone. Any thoughts as to what happened?

Error: Call to a member function primaryMedia() on null in /home/visuali3/public_html/collection/modules/Sharing/Module.php:198
Stack trace:
#0 /home/visuali3/public_html/collection/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Sharing\Module->insertOpenGraphData(Object(Zend\EventManager\Event))
#1 /home/visuali3/public_html/collection/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\EventManager\Event))
#2 /home/visuali3/public_html/collection/application/src/View/Helper/Trigger.php(61): Zend\EventManager\EventManager->triggerEvent(Object(Zend\EventManager\Event))
#3 [internal function]: Omeka\View\Helper\Trigger->__invoke(‘view.show.after’)
#4 /home/visuali3/public_html/collection/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(397): call_user_func_array(Object(Omeka\View\Helper\Trigger), Array)
#5 /home/visuali3/public_html/collection/application/view/omeka/site/page/show.phtml(29): Zend\View\Renderer\PhpRenderer->__call(‘trigger’, Array)
#6 /home/visuali3/public_html/collection/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(506): include(’/home/visuali3/…’)
#7 /home/visuali3/public_html/collection/vendor/zendframework/zend-view/src/View.php(207): Zend\View\Renderer\PhpRenderer->render(NULL)
#8 /home/visuali3/public_html/collection/vendor/zendframework/zend-view/src/View.php(236): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#9 /home/visuali3/public_html/collection/vendor/zendframework/zend-view/src/View.php(200): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#10 /home/visuali3/public_html/collection/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(105): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#11 /home/visuali3/public_html/collection/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#12 /home/visuali3/public_html/collection/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent))
#13 /home/visuali3/public_html/collection/vendor/zendframework/zend-mvc/src/Application.php(367): Zend\EventManager\EventManager->triggerEvent(Object(Zend\Mvc\MvcEvent))
#14 /home/visuali3/public_html/collection/vendor/zendframework/zend-mvc/src/Application.php(348): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent))
#15 /home/visuali3/public_html/collection/index.php(21): Zend\Mvc\Application->run()
#16 {main}

This looks like a bug in the Sharing module that occurs when you have Sharing enabled and are viewing a page with a “blank” attachment on it, for example an attachment left over after you have deleted an item.

We can fix the issue, and you should also be able to delete the “empty” attachment from the page and solve the problem that way.

1 Like

Thanks for the assistance. Would you mind pointing me towards instructions for deleting the attachment?

You should just be able to edit the site page in question and delete the attachment from its block normally, with the “trash can” icon.