Creating resource failer via Admin interface

Hi,

With version 2.1.2 of Omeka-S, we encounter a problem when creating a resource via the Admin interface.

By choosing a resource model or not, by validating the new resource entered, we get the following error:

Zend\ServiceManager\Exception\ServiceNotFoundException
A plugin by the name “mergeValuesJson” was not found in the plugin manager Zend\Mvc\Controller\PluginManager

Détails :

Zend\ServiceManager\Exception\ServiceNotFoundException: A plugin by the name “mergeValuesJson” was not found in the plugin manager Zend\Mvc\Controller\PluginManager in /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-servicemanager/src/AbstractPluginManager.php:142

Does anyone have any ideas ?

Thank you in advance

Can you post the rest of that error message (the “traceback” list of files and line numbers and things like that)?

Here’s the full message :

Zend\ServiceManager\Exception\ServiceNotFoundException
A plugin by the name “mergeValuesJson” was not found in the plugin manager Zend\Mvc\Controller\PluginManager

Détails :

Zend\ServiceManager\Exception\ServiceNotFoundException: A plugin by the name “mergeValuesJson” was not found in the plugin manager Zend\Mvc\Controller\PluginManager in /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-servicemanager/src/AbstractPluginManager.php:142
Stack trace:
#0 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-mvc/src/Controller/PluginManager.php(97): Zend\ServiceManager\AbstractPluginManager->get(‘mergeValuesJson’, NULL)
#1 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(259): Zend\Mvc\Controller\PluginManager->get(‘mergeValuesJson’, NULL)
#2 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(274): Zend\Mvc\Controller\AbstractController->plugin(‘mergeValuesJson’)
#3 /applis/omeka/home/www/omeka-s/application/src/Controller/Admin/ItemController.php(201): Zend\Mvc\Controller\AbstractController->__call(‘mergeValuesJson’, Array)
#4 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(78): Omeka\Controller\Admin\ItemController->addAction()
#5 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#6 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#7 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(106): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#8 /applis/omeka/home/www/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))
#9 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#10 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /applis/omeka/home/www/omeka-s/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#12 /applis/omeka/home/www/omeka-s/index.php(21): Zend\Mvc\Application->run()
#13 {main}

I’m concerned that you might not have completely upgraded Omeka S; that some files might still be their old versions.

In particular this might be an issue with an outdated application/config/module.config.php file. Line 342 of this file should read

            'mergeValuesJson' => Mvc\Controller\Plugin\MergeValuesJson::class,

If yours doesn’t then you’re likely using a copy of this file from an older version of Omeka. If so, you’ll want to double-check that you’ve correctly gotten all the files updated and that this isn’t the only “old” file hanging around.

Hi,

The cause comes from an upgrade of OMEKA-S 2.0.2 => 2.1.2.

I followed the instructions in the Omeka S user manual to the letter…except that I put aside the 4 files under the application/config directory to reinject them after the upgrade.

However, there is only one difference between the 2 versions of the file module.config.php, namely that the line “‘mergeValuesJson’ => Mvc\Controller\Plugin\MergeValuesJson::class,” does not exist in version 2.0.2. So I added it and the problem is solved.

I took the opportunity to compare the 3 other files and no difference appeared

Thank you very much for your answers.

For future reference, the files designed for user-editable configuration are in the “config” folder.

“application/config” files, on the other hand, are part of the system internals and must be upgraded along with the rest of the application. If you’re making alterations to these files that you’re concerned about keeping and that’s why you’re keeping them intact, that shouldn’t be necessary: the “local” config in the top level config folder should be able to override anything in the main “module” config.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.