Omeka-S upgrade error

I am trying to upgrade Omeka-S from 1.3 to 1.4, which I have done without error in Development, and am getting the following error:

Omeka S encountered an error

Doctrine\DBAL\Exception\InvalidFieldNameException
An exception occurred while executing ‘SELECT s0_.id AS id_0, s0_.slug AS slug_1, s0_.theme AS theme_2, s0_.title AS title_3, s0_.summary AS summary_4, s0_.navigation AS navigation_5, s0_.item_pool AS item_pool_6, s0_.created AS created_7, s0_.modified AS modified_8, s0_.is_public AS is_public_9, s0_.homepage_id AS homepage_id_10, s0_.owner_id AS owner_id_11 FROM site s0_ GROUP BY s0_.id ORDER BY s0_.id ASC’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘s0_.homepage_id’ in ‘field list’

No fair! It’s trying to update the DB when this error is caught.

Advice appreciated,

Mark

This happens when you click the “Migrate” button? Can you show the rest of the error? (the “Stack trace” part)

The 1.3 to 1.4 migration adds that homepage_id column and doesn’t really do anything else… what you’re describing sounds more like what would happen if you had somehow avoided the upgrade and were using the site.

Thanks, I think that’s the Clue I need.

I should have read this a little closer:

Installing - Omeka S User Manual
In your web browser, go to your site’s admin page (yoururl/admin) and run any migrations that are needed.

I thought the Omeka-S upgrade process was the same as Omeka Classic. Not so.

Thanks!

Mark

Well, that is pretty much the same process as for Classic: you go to the admin side and click a button that runs the upgrades.

Did something else happen for you?

click a button

I tried again last evening. I did not see any such button. Rather, I put the new codebase in place, then hit /omeka-s/admin. It page-refreshed to /omeka-s/admin/migrate, and I saw the same DB error.

I will do everything fresh, Thursday evening.

THANKS for your comments!

Mark

The thing is, the migrate page shouldn’t be trying to load the sites, which is what’s happening to give you the error you’re seeing.

I’m wondering if maybe this is an issue with some module that might be making that query? That’s why I’m interested in the trace part of the message.

Thanks, John,

Here is that stack trace:

Omeka S encountered an error

Doctrine\DBAL\Exception\InvalidFieldNameException
An exception occurred while executing ‘SELECT s0_.id AS id_0, s0_.slug AS slug_1, s0_.theme AS theme_2, s0_.title AS title_3, s0_.summary AS summary_4, s0_.navigation AS navigation_5, s0_.item_pool AS item_pool_6, s0_.created AS created_7, s0_.modified AS modified_8, s0_.is_public AS is_public_9, s0_.homepage_id AS homepage_id_10, s0_.owner_id AS owner_id_11 FROM site s0_ GROUP BY s0_.id ORDER BY s0_.id ASC’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘s0_.homepage_id’ in ‘field list’

Details:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘s0_.homepage_id’ in ‘field list’ in /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104 Stack trace: #0 /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(104): PDO->query(‘SELECT s0_.id A…’) #1 /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(852): Doctrine\DBAL\Driver\PDOConnection->query(‘SELECT s0_.id A…’) #2 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery(‘SELECT s0_.id A…’, Array, Array, NULL) #3 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(321): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array) #4 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(962): Doctrine\ORM\Query->doExecute() #5 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(917): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1) #6 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(720): Doctrine\ORM\AbstractQuery->execute(NULL, 1) #7 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(171): Doctrine\ORM\AbstractQuery->getResult(1) #8 /var/www/html/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(255): Doctrine\ORM\Tools\Pagination\Paginator->getIterator() #9 /var/www/html/omeka-s/application/src/Api/Manager.php(221): Omeka\Api\Adapter\AbstractEntityAdapter->search(Object(Omeka\Api\Request)) #10 /var/www/html/omeka-s/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request)) #11 /var/www/html/omeka-s/modules/Search/src/Api/ManagerDelegator.php(35): Omeka\Api\Manager->search(‘sites’, Array, Array) #12 /var/www/html/omeka-s/modules/GoogleAnalytics/Module.php(199): Search\Api\ManagerDelegator->search(‘sites’, Array) #13 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): GoogleAnalytics\Module->printScript(Object(Zend\EventManager\Event)) #14 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\EventManager\Event)) #15 /var/www/html/omeka-s/application/src/View/Helper/Trigger.php(61): Zend\EventManager\EventManager->triggerEvent(Object(Zend\EventManager\Event)) #16 [internal function]: Omeka\View\Helper\Trigger->invoke(‘view.layout’) #17 /var/www/html/omeka-s/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(397): call_user_func_array(Object(Omeka\View\Helper\Trigger), Array) #18 /var/www/html/omeka-s/application/view/layout/layout.phtml(11): Zend\View\Renderer\PhpRenderer->call(‘trigger’, Array) #19 /var/www/html/omeka-s/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(506): include(’/var/www/html/o…’) #20 /var/www/html/omeka-s/index.php(36): Zend\View\Renderer\PhpRenderer->render(NULL) #21 {main} Next Doctrine\DBAL\Driver\PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 's0.homepage_id’ in ‘field list’ in /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106 Stack trace: #0 /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(852): Doctrine\DBAL\Driver\PDOConnection->query('SELECT s0.id A…’) #1 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT s0.id A…’, Array, Array, NULL) #2 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(321): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array) #3 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(962): Doctrine\ORM\Query->doExecute() #4 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(917): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1) #5 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(720): Doctrine\ORM\AbstractQuery->execute(NULL, 1) #6 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(171): Doctrine\ORM\AbstractQuery->getResult(1) #7 /var/www/html/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(255): Doctrine\ORM\Tools\Pagination\Paginator->getIterator() #8 /var/www/html/omeka-s/application/src/Api/Manager.php(221): Omeka\Api\Adapter\AbstractEntityAdapter->search(Object(Omeka\Api\Request)) #9 /var/www/html/omeka-s/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request)) #10 /var/www/html/omeka-s/modules/Search/src/Api/ManagerDelegator.php(35): Omeka\Api\Manager->search(‘sites’, Array, Array) #11 /var/www/html/omeka-s/modules/GoogleAnalytics/Module.php(199): Search\Api\ManagerDelegator->search(‘sites’, Array) #12 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): GoogleAnalytics\Module->printScript(Object(Zend\EventManager\Event)) #13 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\EventManager\Event)) #14 /var/www/html/omeka-s/application/src/View/Helper/Trigger.php(61): Zend\EventManager\EventManager->triggerEvent(Object(Zend\EventManager\Event)) #15 [internal function]: Omeka\View\Helper\Trigger->invoke(‘view.layout’) #16 /var/www/html/omeka-s/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(397): call_user_func_array(Object(Omeka\View\Helper\Trigger), Array) #17 /var/www/html/omeka-s/application/view/layout/layout.phtml(11): Zend\View\Renderer\PhpRenderer->call(‘trigger’, Array) #18 /var/www/html/omeka-s/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(506): include(’/var/www/html/o…’) #19 /var/www/html/omeka-s/index.php(36): Zend\View\Renderer\PhpRenderer->render(NULL) #20 {main} Next Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT s0.id AS id_0, s0.slug AS slug_1, s0.theme AS theme_2, s0.title AS title_3, s0.summary AS summary_4, s0.navigation AS navigation_5, s0.item_pool AS item_pool_6, s0_.created AS created_7, s0_.modified AS modified_8, s0_.is_public AS is_public_9, s0_.homepage_id AS homepage_id_10, s0_.owner_id AS owner_id_11 FROM site s0_ GROUP BY s0_.id ORDER BY s0_.id ASC’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘s0_.homepage_id’ in ‘field list’ in /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:71 Stack trace: #0 /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException(‘An exception oc…’, Object(Doctrine\DBAL\Driver\PDOException)) #1 /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(855): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), ‘SELECT s0_.id A…’, Array) #2 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery(‘SELECT s0_.id A…’, Array, Array, NULL) #3 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(321): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array) #4 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(962): Doctrine\ORM\Query->_doExecute() #5 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(917): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1) #6 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(720): Doctrine\ORM\AbstractQuery->execute(NULL, 1) #7 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(171): Doctrine\ORM\AbstractQuery->getResult(1) #8 /var/www/html/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(255): Doctrine\ORM\Tools\Pagination\Paginator->getIterator() #9 /var/www/html/omeka-s/application/src/Api/Manager.php(221): Omeka\Api\Adapter\AbstractEntityAdapter->search(Object(Omeka\Api\Request)) #10 /var/www/html/omeka-s/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request)) #11 /var/www/html/omeka-s/modules/Search/src/Api/ManagerDelegator.php(35): Omeka\Api\Manager->search(‘sites’, Array, Array) #12 /var/www/html/omeka-s/modules/GoogleAnalytics/Module.php(199): Search\Api\ManagerDelegator->search(‘sites’, Array) #13 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): GoogleAnalytics\Module->printScript(Object(Zend\EventManager\Event)) #14 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\EventManager\Event)) #15 /var/www/html/omeka-s/application/src/View/Helper/Trigger.php(61): Zend\EventManager\EventManager->triggerEvent(Object(Zend\EventManager\Event)) #16 [internal function]: Omeka\View\Helper\Trigger->__invoke(‘view.layout’) #17 /var/www/html/omeka-s/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(397): call_user_func_array(Object(Omeka\View\Helper\Trigger), Array) #18 /var/www/html/omeka-s/application/view/layout/layout.phtml(11): Zend\View\Renderer\PhpRenderer->__call(‘trigger’, Array) #19 /var/www/html/omeka-s/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(506): include(’/var/www/html/o…’) #20 /var/www/html/omeka-s/index.php(36): Zend\View\Renderer\PhpRenderer->render(NULL) #21 {main}

It looks from the trace that the issue might be coming from the GoogleAnalytics module. Try disabling it or just temporarily moving its folder out of the modules folder if you can’t currently get to the Modules admin page.

That was it! The Google Analytics module was the culprit.

Now upgraded to Version 1.4 (and yet it’s telling me that 2.01 just came out, grrrrrr.).

Much appreciated,

Mark