Error when trying to add New Item


#1

Hi, my new Installation of Omeka -s is:
CentOS Linux release 7.3.1611
PHP 5.6.31
Zend Engine v2.6.0
Mysql:5.5.52-MariaDB MariaDB
Omeka-s v1.0.0-beta4
Modules - SCV Import and File Sideload
when trying to Add New Item or Edit Item get this error:
Zend\ServiceManager\Exception\ServiceNotFoundException
Unable to resolve service “Omeka\Media\Ingester\Manager” to a factory; are you certain you provided it during configuration?
(I changed env do dev in htaccess so there is more Details for the error)
Thanks,
Vlad


Mapping error message : Notice: Undefined offset: 1
#2

I have that exact same problem but with “Add Item”.

Zend\ServiceManager\Exception\ServiceNotFoundException
Unable to resolve service “Omeka\Media\Ingester\Manager” to a factory; are you certain you provided it during configuration?

Details:

Zend\ServiceManager\Exception\ServiceNotFoundException: Unable to resolve service “Omeka\Media\Ingester\Manager” to a factory; are you certain you provided it during configuration? in /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:681
Stack trace:
#0 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(757): Zend\ServiceManager\ServiceManager->getFactory(‘Omeka\Media\Ing…’)
#1 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(200): Zend\ServiceManager\ServiceManager->doCreate(‘Omeka\Media\Ing…’)
#2 /Applications/MAMP/htdocs/omeka-s/modules/FileSideload/Module.php(35): Zend\ServiceManager\ServiceManager->get(‘Omeka\Media\Ing…’)
#3 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): FileSideload\Module->FileSideload{closure}(Object(Zend\EventManager\Event))
#4 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(144): Zend\EventManager\EventManager->triggerListeners(Object(Zend\EventManager\Event))
#5 /Applications/MAMP/htdocs/omeka-s/application/src/ServiceManager/AbstractPluginManager.php(52): Zend\EventManager\EventManager->trigger(‘service.registe…’, Object(Omeka\Media\Ingester\Manager), Object(ArrayObject))
#6 /Applications/MAMP/htdocs/omeka-s/application/src/Controller/Admin/ItemController.php(432): Omeka\ServiceManager\AbstractPluginManager->getRegisteredNames()
#7 /Applications/MAMP/htdocs/omeka-s/application/src/Controller/Admin/ItemController.php(231): Omeka\Controller\Admin\ItemController->getMediaForms()
#8 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(78): Omeka\Controller\Admin\ItemController->addAction()
#9 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#10 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(106): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#12 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-mvc/src/DispatchListener.php(138): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#13 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#14 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /Applications/MAMP/htdocs/omeka-s/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#16 /Applications/MAMP/htdocs/omeka-s/index.php(21): Zend\Mvc\Application->run()
#17 {main}


#3

That stack trace indicates a problem coming from the FileSideload module. If you deactivate that, can you add Items with media by uploading the media directly?


#4

It stopped throwing the error when I disabled FileSideload module. Then we added ImageMagick that was not installed on the server initially. After that I tried to enable FileSideload module again still get the same error. But I do need batch uploading capabilities. Is there some other module that will do the same thing?


#5

I haven’t been able to reproduce this, so I’m also still at a bit of a loss about the root cause.

There are new versions of both Omeka S and FileSideload out, though, so it’s probably worth hoping that those might give a resolution to the issue.


#6

Ugraded to the latest version of Omeka S and FileSideload no errors. Thanks Patrick.


#7

Hi, I have the same problem; though not with adding the Item but with
Adding the Media (jpg, pdf)
to the existing Item, for which I have created metadata first.

I get a message- Omeka S encountered an error.
In logs I don’t see any error, though.
Version is 1.2.0.

I have tried with deactivating the File Sideload, Mapping modules, but that doesn’t help.

The funny thing is that once I make a new item, and add the Media first, and save it that way, it would accept it; but not the other way around.

Any advice would be much appreciated.
Stasha


#8

Did you enable logging? With logging turned on you should get a log entry every time you see that “encountered an error” page. Make sure also that the log file is writable by the server (the same kind of permissions needed for the files folder).


#9

Yes, here is the message:

[Tue Jan 22 08:52:57.067448 2019] [php7:notice] [pid 15559:tid 140308783449856] [client 24.25.244.190:50027] Omeka\Mvc\Exception\PermissionDeniedException: Permission denied for the current user to access the index action of the Omeka\Controller\Install controller. in /var/www/html/omeka/application/src/Mvc/MvcListeners.php:440\nStack trace:\n#0 /var/www/html/omeka/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Omeka\Mvc\MvcListeners->authorizeUserAgainstController(Object(Zend\Mvc\MvcEvent))\n#1 /var/www/html/omeka/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))\n#2 /var/www/html/omeka/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))\n#3 /var/www/html/omeka/index.php(21): Zend\Mvc\Application->run()\n#4 {main}, referer: https://dlib.stasha.net:8443/install


#10

The same thing is happening to me too. I’m fine if I add the media before the initial save but not after. Originally, I was just getting a generic error message and now this one. Did you ever figure out what was causing the problem?


#11

I have solved it by deactivating some of the modules others suggested. Now it works fine


#12

I tried deactivating FileSideLoad that was mentioned in the earlier suggestion, but it doesn’t seem to make a difference. I can create an item and add media immediately before the initial save. However, after that, I get error messages when adding media like the following:
Doctrine\ORM\ORMInvalidArgumentException
A new entity was found through the relationship ‘AltText\Entity\AltText#media’ that was not configured to cascade persist operations for entity: Omeka\Entity\Media@0000000026a3940700007f3606f1fb86. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(…,cascade={“persist”}). If you cannot find out which entity causes the problem implement ‘Omeka\Entity\Media#__toString()’ to get a clue.

Details:

exception ‘Doctrine\ORM\ORMInvalidArgumentException’ with message ‘A new entity was found through the relationship ‘AltText\Entity\AltText#media’ that was not configured to cascade persist operations for entity: Omeka\Entity\Media@0000000026a3940700007f3606f1fb86. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(…,cascade={“persist”}). If you cannot find out which entity causes the problem implement ‘Omeka\Entity\Media#__toString()’ to get a clue.’ in /export/www/exhibits.uncc.edu/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php:92 Stack trace: #0 /export/www/exhibits.uncc.edu/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(852): Doctrine\ORM\ORMInvalidArgumentException::newEntityFoundThroughRelationship(Array, Object(Omeka\Entity\Media)) #1 /export/www/exhibits.uncc.edu/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(740): Doctrine\ORM\UnitOfWork->computeAssociationChanges(Array, Object(Omeka\Entity\Media)) #2 /export/www/exhibits.uncc.edu/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(452): Doctrine\ORM\UnitOfWork->computeChangeSet(Object(Doctrine\ORM\Mapping\ClassMetadata), Object(AltText\Entity\AltText)) #3 /export/www/exhibits.uncc.edu/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(765): Doctrine\ORM\UnitOfWork->computeScheduleInsertsChangeSets() #4 /export/www/exhibits.uncc.edu/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(340): Doctrine\ORM\UnitOfWork->computeChangeSets() #5 /export/www/exhibits.uncc.edu/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(356): Doctrine\ORM\UnitOfWork->commit(NULL) #6 /export/www/exhibits.uncc.edu/application/src/Api/Adapter/AbstractEntityAdapter.php(353): Doctrine\ORM\EntityManager->flush() #7 /export/www/exhibits.uncc.edu/application/src/Api/Manager.php(233): Omeka\Api\Adapter\AbstractEntityAdapter->update(Object(Omeka\Api\Request)) #8 /export/www/exhibits.uncc.edu/application/src/Api/Manager.php(136): Omeka\Api\Manager->execute(Object(Omeka\Api\Request)) #9 /export/www/exhibits.uncc.edu/application/src/Mvc/Controller/Plugin/Api.php(152): Omeka\Api\Manager->update(‘items’, ‘3164’, Array, Array, Array) #10 /export/www/exhibits.uncc.edu/application/src/Controller/Admin/ItemController.php(241): Omeka\Mvc\Controller\Plugin\Api->update(‘items’, ‘3164’, Array, Array) #11 /export/www/exhibits.uncc.edu/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(78): Omeka\Controller\Admin\ItemController->editAction() #12 /export/www/exhibits.uncc.edu/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent)) #13 /export/www/exhibits.uncc.edu/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure)) #14 /export/www/exhibits.uncc.edu/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(106): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent)) #15 /export/www/exhibits.uncc.edu/vendor/zendframework/zend-mvc/src/DispatchListener.php(138): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response)) #16 /export/www/exhibits.uncc.edu/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent)) #17 /export/www/exhibits.uncc.edu/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure)) #18 /export/www/exhibits.uncc.edu/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent)) #19 /export/www/exhibits.uncc.edu/index.php(21): Zend\Mvc\Application->run() #20 {main}


#13

Try updating the Alt Text module to version 1.0.2.


#14

Thanks. I just saw that there is a new version. I’ll try updating it.