Default Sort Error

Hi all–

Hoping to use the Default Sort plugin to, well, change the default sort on browse. I’ve installed the plugin in two Omeka instances on on the same server/hosting environment and keep getting this error on the config page for one of the installs. It works fine with the other Omeka install:

Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /home/vfc/vtfolklifearchive.org/collections/plugins/DefaultSort/config_form.php:153 Stack trace: #0 /home/vfc/vtfolklifearchive.org/collections/plugins/DefaultSort/config_form.php(153): in_array(1, false) #1 /home/vfc/vtfolklifearchive.org/collections/plugins/DefaultSort/DefaultSortPlugin.php(68): include(’/home/vfc/vtfol…’) #2 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Omeka/Plugin/Broker.php(142): DefaultSortPlugin->hookConfigForm(Array) #3 /home/vfc/vtfolklifearchive.org/collections/admin/themes/default/plugins/config.php(8): Omeka_Plugin_Broker->callHook(‘config_form’, Array, Object(Plugin)) #4 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Omeka/View.php(114): include(’/home/vfc/vtfol…’) #5 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run(’/home/vfc/vtfol…’) #6 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render(NULL) #7 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript(‘plugins/config…’, NULL) #8 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render() #9 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch() #10 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch() #11 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘configAction’) #12 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #13 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch() #14 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #15 /home/vfc/vtfolklifearchive.org/collections/application/libraries/Omeka/Application.php(73): Zend_Application->run() #16 /home/vfc/vtfolklifearchive.org/collections/admin/index.php(28): Omeka_Application->run() #17 {main} thrown in /home/vfc/vtfolklifearchive.org/collections/plugins/DefaultSort/config_form.php on line 153

Any advice?

Thank you!

What version of PHP are you using on this server? Some problems like this only occur with very new versions of PHP (i.e., 8.0 and up).

Though either way this is probably something that the plugin developer would need to fix. You should probably report it on the plugin’s issue tracker.