Record exception error

Hi all;

I’m seeing the following error message in our omeka error log. It’s being thrown so frequently, there are, literally, hundreds of these, so many they are ballooning the error log file size and making it very hard for me to locate other error messages. Could this have anything to do with the fact that we are using the solrsearch plugin? Is there any way to make these stop?

2025-09-05T14:02:55-04:00 ERR (3): Omeka_Record_Exception: Invalid search type given! in /var/www/html/omeka/application/models/Table/Item.php:143

Stack trace:

#0 /var/www/html/omeka/application/models/Table/Item.php(28): Table_Item->_advancedSearch()

#1 /var/www/html/omeka/application/models/Table/Item.php(432): Table_Item->filterBySearch()

#2 /var/www/html/omeka/application/libraries/Omeka/Db/Table.php(323): Table_Item->applySearchFilters()

#3 /var/www/html/omeka/application/libraries/Omeka/Db/Table.php(277): Omeka_Db_Table->getSelectForFindBy()

#4 /var/www/html/omeka/application/controllers/helpers/Db.php(59): Omeka_Db_Table->findBy()

#5 /var/www/html/omeka/application/libraries/Omeka/Controller/AbstractActionController.php(144): Omeka_Controller_Action_Helper_Db->__call()

#6 /var/www/html/omeka/application/controllers/ItemsController.php(180): Omeka_Controller_AbstractActionController->browseAction()

#7 /var/www/html/omeka/application/libraries/Zend/Controller/Action.php(516): ItemsController->browseAction()

#8 /var/www/html/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch()

#9 /var/www/html/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch()

#10 /var/www/html/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch()

#11 /var/www/html/omeka/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()

#12 /var/www/html/omeka/application/libraries/Omeka/Application.php(73): Zend_Application->run()

#13 /var/www/html/omeka/index.php(23): Omeka_Application->run()

#14 {main}

These errors will get logged if someone tries to do an “advanced” item search and sends in the query a search type that doesn’t exist. It probably doesn’t have anything to do with your use of Solr.

If you’re seeing a lot of these I’d wager it’s bots trying to go to invalid URLs. You could probably correlate with your access logs and see the requests that are causing these errors to be logged.

We don’t have any options you can change or anything in the software itself to make this not get logged, but you could block the offending requests at the Apache level or elsewhere.

Thank you, I’ll look into trying to block these at the apache level.

After doing a bit of looking at our apache access logs, it looks like this is the url that’s causing the problem:

/items/browse?advanced(a bunch of specific search terms and tags follows)

I could see this url was being accessed a lot by bots (you can tell from the user-agent field), and generating 500 errors.

I decided to try to handle this by adding a line in our robots.txt file directing webcrawlers not to access this url:

Disallow: /items/browse?advanced*