I am having issues upgrading the Reference module after doing a major migration from an old Omeka instance.
The previous version of the module is 3.4.5, and I try to upgrade to 3.4.30.3.
I get the following error message:
TypeError
Argument 1 passed to Reference\Mvc\Controller\Plugin\ReferenceTree::convertFlatLevelsToTree() must be of the type array, string given, called in /var/www/html/modules/Reference/data/scripts/upgrade.php on line 64
Details:
TypeError: Argument 1 passed to Reference\Mvc\Controller\Plugin\ReferenceTree::convertFlatLevelsToTree() must be of the type array, string given, called in /var/www/html/modules/Reference/data/scripts/upgrade.php on line 64 and defined in /var/www/html/modules/Reference/src/Mvc/Controller/Plugin/ReferenceTree.php:112
Stack trace:
#0 /var/www/html/modules/Reference/data/scripts/upgrade.php(64): Reference\Mvc\Controller\Plugin\ReferenceTree->convertFlatLevelsToTree('')
#1 /var/www/html/modules/Reference/src/Generic/AbstractModule.php(115): require_once('/var/www/html/m...')
#2 /var/www/html/application/src/Module/Manager.php(321): Generic\AbstractModule->upgrade('3.4.5', '3.4.30.3', Object(Laminas\ServiceManager\ServiceManager))
#3 /var/www/html/application/src/Controller/Admin/ModuleController.php(250): Omeka\Module\Manager->upgrade(Object(Omeka\Module\Module))
#4 /var/www/html/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(77): Omeka\Controller\Admin\ModuleController->upgradeAction()
#5 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#6 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#7 /var/www/html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(105): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#8 /var/www/html/vendor/laminas/laminas-mvc/src/DispatchListener.php(139): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#9 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#10 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#11 /var/www/html/vendor/laminas/laminas-mvc/src/Application.php(331): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#12 /var/www/html/index.php(21): Laminas\Mvc\Application->run()
#13 {main}
This made me think something was off on line 64 of the upgrade.php script, so I manually forced the $tree variable to an empty array, and the migration then succeeded.
I am having issues upgrading the Reference module after doing a major migration from an old Omeka instance. The previous version of the module is 3.4.5, and I try to upgrade to 3.4.30.3.
I get the following error message:
This made me think something was off on line 64 of the
upgrade.php
script, so I manually forced the$tree
variable to an empty array, and the migration then succeeded.