Exhibit Builder

I recently updated Omeka to from 2.4 to latest version2.5.1
I have Exhibit Builder 3.3.3
Everytime that I try to add a page to an exhibition, I get this error code

exception ‘Zend_Db_Statement_Mysqli_Exception’ with message ‘Mysqli prepare error: Unknown column ‘added’ in ‘field list’’ in /var/www/html/omeka_medieval/application/libraries/Zend/Db/Statement/Mysqli.php:77
Stack trace:
#0 /var/www/html/omeka_medieval/application/libraries/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare(‘INSERT INTO om...') #1 /var/www/html/omeka_medieval/application/libraries/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTOom…’)
#2 /var/www/html/omeka_medieval/application/libraries/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare(‘INSERT INTO om...') #3 [internal function]: Zend_Db_Adapter_Abstract->query('INSERT INTOom…’, Array)
#4 /var/www/html/omeka_medieval/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#5 /var/www/html/omeka_medieval/application/libraries/Omeka/Db.php(252): Omeka_Db->__call(‘query’, Array)
#6 /var/www/html/omeka_medieval/application/libraries/Omeka/Db.php(252): Omeka_Db->query(‘INSERT INTO `om…’, Array)
#7 /var/www/html/omeka_medieval/application/libraries/Omeka/Record/AbstractRecord.php(543): Omeka_Db->insert(‘ExhibitPage’, Array)
#8 /var/www/html/omeka_medieval/plugins/ExhibitBuilder/models/Exhibit.php(245): Omeka_Record_AbstractRecord->save()
#9 /var/www/html/omeka_medieval/plugins/ExhibitBuilder/models/Exhibit.php(201): Exhibit->_savePages(Array)
#10 [internal function]: Exhibit->afterSave(Array)
#11 /var/www/html/omeka_medieval/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#12 /var/www/html/omeka_medieval/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks(‘afterSave’, Array)
#13 /var/www/html/omeka_medieval/application/libraries/Omeka/Controller/AbstractActionController.php(229): Omeka_Record_AbstractRecord->save(false)
#14 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Action.php(516): Omeka_Controller_AbstractActionController->editAction()
#15 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘editAction’)
#16 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#17 /var/www/html/omeka_medieval/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#18 /var/www/html/omeka_medieval/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#19 /var/www/html/omeka_medieval/application/libraries/Omeka/Application.php(77): Zend_Application->run()
#20 /var/www/html/omeka_medieval/admin/index.php(28): Omeka_Application->run()
#21 {main}

1 Like

Did you have some problem upgrading to Exhibit Builder 3.3.3?

3.3.3’s upgrade adds the column this error is complaining about being missing. If you encountered a problem and tried to work around it, it could have resulted in this issue.

You can try one of two methods to fix it: you could roll back the version stored in the plugins table for Exhibit Builder so it will re-run the upgrade (for example, set it to 3.3.2), or you could manually add the missing column(s). Of course backup your database before doing either.

If you don’t actually have any exhibits you care about, then there’s the easiest path: just uninstall and reinstall the plugin.

How can I downgrade to version 3.3.2? Do I need to do this in mysql?
I am running a virtual redhat host with mysql database.
the installation of omeka is in /var/www/html/omeka_medieval folder in Unix
Can you walk me through the downgrade?
BTW, the faculty does have exhibits, so I cannot uninstall the Exhibit Builder plugin as I wanted.

Thank you kindly.

What are the missing columns ? We have chosen to backup the database and add the missing columns in Exhibit Builder, but we need to know what they are?

Thank you

Both of the options I mentioned require accessing the MySQL database directly.

The version number is stored in the plugins table, in the “ExhibitBuilder” row.

As for adding the columns manually, the source is the place to check for that kind of thing. In this case, the columns are added and modified, both with the definition TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'

Thank you very much. We want to try adding the columns manually. When you mean ‘the source’, is that the name of the table? I am new to this, but if I’m at at mysql prompt, how would i fix?

mysql> use omeka_medieval;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>

mysql> show tables;
±---------------------------------------+
| Tables_in_omeka_medieval |
±---------------------------------------+
| omk_collections |
| omk_comments |
| omk_csv_import_imported_items |
| omk_csv_import_imports |
| omk_element_sets |
| omk_element_texts |
| omk_elements |
| omk_exhibit_block_attachments |
| omk_exhibit_page_blocks |
| omk_exhibit_pages |
| omk_exhibits |
| omk_files |
| omk_iiif_items_cached_json_data |
| omk_iiif_items_job_statuses |
| omk_item_types |
| omk_item_types_elements |
| omk_items |
| omk_keys |
| omk_neatline_exhibits |
| omk_neatline_records |
| omk_neatline_simile_exhibit_expansions |
| omk_options |
| omk_plugins |
| omk_processes |
| omk_records_tags |
| omk_schema_migrations |
| omk_search_texts |
| omk_sessions |
| omk_simple_pages_pages |
| omk_tags |
| omk_tei_display_stylesheets |
| omk_tei_display_texts |
| omk_users |
| omk_users_activations |
±---------------------------------------+
34 rows in set (0.00 sec)

mysql> select * from omk_plugins;
±—±------------------±-------±--------+
| id | name | active | version |
±—±------------------±-------±--------+
| 4 | SimplePages | 1 | 3.0.8 |
| 5 | Coins | 1 | 2.0.3 |
| 18 | ExhibitBuilder | 1 | 3.3.3 |
| 19 | IiifItems | 1 | 1.0.0 |
| 20 | CentralAuth | 1 | 1.2 |
| 21 | Neatline | 1 | 2.5.2 |
| 22 | NeatlineSimile | 1 | 2.0.4 |
| 23 | CsvImport | 1 | 2.0.4 |
| 24 | NeatlineWaypoints | 1 | 2.0.2 |
| 25 | SimpleContactForm | 1 | 0.5 |
| 26 | SocialBookmarking | 1 | 2.0.2 |
±—±------------------±-------±--------+
11 rows in set (0.00 sec)

mysql>

“the source” was a link to the part of the code that contained the actual update queries the plugin runs when it upgrades.

The table you’re looking for to add the columns manually would be, in your case, “omk_exhibit_pages”

You can also just post the output of

SHOW CREATE TABLE omk_exhibit_pages;

if you want more advice (that will show what columns are there now and make it easier to accurately say what would be your best choice).