Serializable Deprecated errors on every page

Howdy!

I’m developing a theme for a friend and was working on a subset of the full site until today when it became necessary to work against the full site which uses additional plugins. Ever since downloading that version of the site and installing a version of that database I now get these errors at the top of every user page:

Deprecated: Zend_Stdlib_SplPriorityQueue implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Stdlib\SplPriorityQueue.php on line 387

Deprecated: Return type of Zend_Stdlib_PriorityQueue::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Stdlib\PriorityQueue.php on line 137

Deprecated: Return type of Zend_Stdlib_PriorityQueue::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Stdlib\PriorityQueue.php on line 174

Deprecated: Zend_Stdlib_PriorityQueue implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Stdlib\PriorityQueue.php on line 40

I checked my copy of the original clone site and the folder Stdlib doesn’t even exist under application/libraries/Zend so I assume one of the other plugins I wasn’t using previously forced that addition.

I am running Omeka Classic 3.1.2, Apache 2.4.62 and PHP 8.2.10 which seem to be the latest versions of each.

If I delete the Stdlib folder this is the error that get in case that help figure out the problem plugin:

Warning: require_once(V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Stdlib\CallbackHandler.php): Failed to open stream: No such file or directory in V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\EventManager\EventCollection.php on line 21

Fatal error: Uncaught Error: Failed opening required 'Zend/Stdlib/CallbackHandler.php' (include_path='V:\dev\icggallery\omeka\Apache24\htdocs/application/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/application/models;.;C:\php\pear;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/ExhibitBuilder/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/ExhibitBuilder/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/SimplePages/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/AdminImages/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/Import/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/Import/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/SimpleVocab/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/SimpleVocab/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/DublinCoreExtended/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/JobDiagnostics/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/JobDiagnostics/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/BulkMetadataEditor/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/BatchUpload/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/BatchUpload/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/CollectionTree/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/omeka-amazon-s3-storage-adapter-master/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/CsvExport/libraries;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/ItemOrder/models;V:\dev\icggallery\omeka\Apache24\htdocs/plugins/CollectionsPlus/models')
in V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\EventManager\EventCollection.php:21 Stack trace: #0 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\EventManager\EventManager.php(22): require_once() #1
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\EventManager\StaticEventManager.php(21): require_once('V:\\dev\\icggalle...') #2 V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Loader\StandardAutoloader.php(319): include('V:\\dev\\icggalle...') #3 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Loader\StandardAutoloader.php(241): Zend_Loader_StandardAutoloader->loadClass('Zend_EventManag...', 'fallback_autolo...') #4 
V:\dev\icggallery\omeka\Apache24\htdocs\plugins\Import\ImportPlugin.php(97): Zend_Loader_StandardAutoloader->autoload('Zend_EventManag...') #5 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Omeka\Plugin\Broker.php(154): ImportPlugin->hookInitialize(Array) #6 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Omeka\Application\Resource\Plugins.php(25): Omeka_Plugin_Broker->callHook('initialize') #7 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(685): Omeka_Application_Resource_Plugins->init() #8 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(628): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('plugins') #9 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Application\Bootstrap\BootstrapAbstract.php(588): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('plugins') #10 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\Application.php(373): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL) #11 
V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Omeka\Application.php(49): Zend_Application->bootstrap() #12
V:\dev\icggallery\omeka\Apache24\htdocs\index.php(23): Omeka_Application->initialize() #13
{main} thrown in V:\dev\icggallery\omeka\Apache24\htdocs\application\libraries\Zend\EventManager\EventCollection.php on line 21

The live server is running PHP 7.3 which I assume is the reason the errors don’t show up there. Is there a fix for this or is there a way to suppress the errors from showing at the top of every page?

“Stdlib” and the things under it formerly existed in older versions of Omeka Classic but have been removed since version 3.1.

The great majority of plugins don’t use and never used anything in that folder, but the one you’re dealing with here, “Import,” may be one of the rare exceptions. Really the plugin is probably not compatible with version 3.1, but this site either manually restored those Stdlib files or simply did the upgrade in such a way that left them in place. Probably more than just Stdlib has been “restored” in the same way on this install (as a relevant example, EventManager).

You can turn off error display to avoid those errors showing, as they’re just deprecation notices, or change the error_reporting setting to not report deprecations. If it’s not actually in use, removing the Import plugin may be a fine solution also.

1 Like

Thanks so much, disabling that one plugin removed all errors. Do you know an equivalent? It appears they designed a bulk CSV import for their custom Item Type which is where they are using it. I will ask the curator if they actively use it as I would like them to upgrade PHP.