Troubleshooting an upgraded theme


#1

Hello,

I recently used the Upgrade to Omeka-S plugin for Omeka Classic to generate a theme for Omeka-S based on the custom theme we had for our Omeka instance. However, when I go to view any of the sites in Omeka-S with the theme that was generated I receive the error:

Zend\View\Exception\InvalidArgumentException
A current item variable has not been set to this view.

Details:

Zend\View\Exception\InvalidArgumentException: A current item variable has not been set to this view. in /var/www/html/omeka-s/modules/UpgradeFromOmekaClassic/src/View/Helper/Upgrade.php:3050
Stack trace:
#0 /var/www/html/omeka-s/themes/mutter/helper/custom.php(398): UpgradeFromOmekaClassic\View\Helper\Upgrade->get_current_record(‘item’)
#1 /var/www/html/omeka-s/themes/mutter/view/layout/layout.phtml(35): meta_tags()
#2 /var/www/html/omeka-s/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(505): include(’/var/www/html/o…’)
#3 /var/www/html/omeka-s/index.php(36): Zend\View\Renderer\PhpRenderer->render(NULL)
#4 {main}

I’ve looked at the lines indicated in layout.phtml file and the helper/custom.php file, but I can’t determine what the issue is.

Does anyone have any insight into this?

Thanks!

Tristan Dahn
Digital Projects Librarian
College of Physicians of Philadelphia


#2

I think your theme wants to display an item in home page whereas Omeka S index.php does not provide it.

In layout.phtml, try to comment meta_tags() call.