Error when search using boolean /exact match | Omeka 2.7.0

Open
#31 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
backend, databases

Research direction

Start by reproducing the boolean or exact-match search failure in Omeka 2.7.0 with the Reports plugin enabled, then inspect application/views/scripts/search/index.php and the Reports plugin code involved in get_record_by_id('Reports_Report', 1). Confirm which table lookup produces the missing omeka_reports_reports error; done means the search completes without that database exception and existing report tables remain usable.

Written by the indexing model from the issue text.

Description

When searching with these option form the home page, it brokes. Deactiving the plugin works fine

The plugins seems to work fine, but the next table reports_reports is not in the DB. The existing plugin tables are:
| omeka_reports
| omeka_reports_files
| omeka_reports_items

ERROR:
Zend_Db_Statement_Mysqli_Exception
Mysqli prepare error: Table 'db.omeka_reports_reports' doesn't exist

Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Table 'db.omeka_reports_reports' doesn't exist in /var/www/html/application/libraries/Zend/Db/Statement/Mysqli.php:77
Stack trace:

#0 /var/www/html/application/libraries/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT `reports...')
#1 /var/www/html/application/libraries/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT `reports...')
#2 /var/www/html/application/libraries/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('SELECT `reports...')
#3 /var/www/html/application/libraries/Zend/Db/Adapter/Abstract.php(756): Zend_Db_Adapter_Abstract->query('SELECT `reports...', Array)
#4 /var/www/html/application/libraries/Omeka/Db.php(80): Zend_Db_Adapter_Abstract->fetchRow(Object(Omeka_Db_Select), Array)
#5 /var/www/html/application/libraries/Omeka/Db/Table.php(669): Omeka_Db->__call('fetchRow', Array)
#6 /var/www/html/application/libraries/Omeka/Db/Table.php(214): Omeka_Db_Table->fetchObject(Object(Omeka_Db_Select), Array)
#7 /var/www/html/application/libraries/globals.php(1879): Omeka_Db_Table->find(1)
#8 /var/www/html/application/views/scripts/search/index.php(20): get_record_by_id('Reports_Report', 1)
#9 /var/www/html/application/libraries/Omeka/View.php(114): include('/var/www/html/a...')
#10 /var/www/html/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run('/var/www/html/a...')
#11 /var/www/html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render(NULL)
#12 /var/www/html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript('search/index.ph...', NULL)
#13 /var/www/html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render()
#14 /var/www/html/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#15 /var/www/html/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#16 /var/www/html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('indexAction')
#17 /var/www/html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#18 /var/www/html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#19 /var/www/html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#20 /var/www/html/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#21 /var/www/html/index.php(23): Omeka_Application->run()
#22 {main}
Dominant language
PHP
Stars
6
Forks
6
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from omeka/plugin-Reports

All issues in omeka/plugin-Reports

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.