Upgrade from 4.0.4 to 4.1 failed

Everything seemed to copy over OK, but 4.1 did not start, with the following error:

Fri Apr 19 10:07:32.733563 2024] [php:error] [pid 872075:tid 139980768769792] [client 164.76.108.86:64367] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Omeka\View\Renderer\ApiJsonRenderer::__construct(), 0 passed in /home/apache2/htdocs/vendor/laminas/laminas-servicemanager/src/Factory/InvokableFactory.php on line 27 and exactly 1 expected in /home/apache2/htdocs/application/src/View/Renderer/ApiJsonRenderer.php:27\nStack trace:\n#0 /home/apache2/htdocs/vendor/laminas/laminas-servicemanager/src/Factory/InvokableFactory.php(27): Omeka\View\Renderer\ApiJsonRenderer->__construct()\n#1 /home/apache2/htdocs/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(615): Laminas\ServiceManager\Factory\InvokableFactory->__invoke(Object(Laminas\ServiceManager\ServiceManager), ‘Next\\View\\Rende…’, NULL)\n#2 /home/apache2/htdocs/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(234): Laminas\ServiceManager\ServiceManager->doCreate(‘Next\\View\\Rende…’)\n#3 /home/apache2/htdocs/application/src/Service/ViewApiJsonStrategyFactory.php(24): Laminas\ServiceManager\ServiceManager->get(‘Omeka\\ViewApiJs…’)\n#4 /home/apache2/htdocs/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(615): Omeka\Service\ViewApiJsonStrategyFactory->__invoke(Object(Laminas\ServiceManager\ServiceManager), ‘Omeka\\ViewApiJs…’, NULL)\n#5 /home/apache2/htdocs/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(234): Laminas\ServiceManager\ServiceManager->doCreate(‘Omeka\\ViewApiJs…’)\n#6 /home/apache2/htdocs/vendor/laminas/laminas-mvc/src/View/Http/ViewManager.php(249): Laminas\ServiceManager\ServiceManager->get(‘Omeka\\ViewApiJs…’)\n#7 /home/apache2/htdocs/vendor/laminas/laminas-mvc/src/View/Http/ViewManager.php(107): Laminas\Mvc\View\Http\ViewManager->registerViewStrategies()\n#8 /home/apache2/htdocs/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\View\Http\ViewManager->onBootstrap(Object(Laminas\Mvc\MvcEvent))\n#9 /home/apache2/htdocs/vendor/laminas/laminas-eventmanager/src/EventManager.php(171): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent))\n#10 /home/apache2/htdocs/vendor/laminas/laminas-mvc/src/Application.php(154): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\Mvc\MvcEvent))\n#11 /home/apache2/htdocs/application/src/Mvc/Application.php(40): Laminas\Mvc\Application->bootstrap(Array)\n#12 /home/apache2/htdocs/index.php(19): Omeka\Mvc\Application::init(Array)\n#13 {main}\n thrown in /home/apache2/htdocs/application/src/View/Renderer/ApiJsonRenderer.php on line 27

Does look familiar, or give any clues?

It appears there’s a incompatibility with a module. Deactivate the “Next” module and reload the page.

Ooooh. I will give that a try. I suspect that “Next” might be more or less defunct, anyhow…

Thanks!

Hi @haenck ,

I know you’ve probably solved this issue now, but I wanted to share how we handle downgrading when something goes wrong or we find that a required module isn’t ready yet.

I recorded this short video to demonstrate how we create backups when upgrading and then easily revert to a backup when we run into compatibility issues.

You can also use RefBytes Platform Manager to create a test site for testing upgrades and compatibility issues before running updates on your production site.

To learn more you can visit: RefBytes Platform Manager