Can't save edits to Simple Page - Zend errors

When I try to save an edit to a SimplePage, I get this Omeka error:

Zend_Db_Statement_Mysqli_Exception
Mysqli prepare error: Unknown column ‘use_tiny_mce’ in ‘field list’

This was happening on my Omeka 2.1 install and I found a workaround: to comment out a few lines in simplepagespage.php files, one in plugins/simplepages/models and one in plugins/simplepages/models/api

Now I have a fresh install of Omeka 2.5.1 and the same issue still exists. The “fix” doesn’t allow saving, as now another Zend error comes up:

Zend_Db_Statement_Mysqli_Exception
Mysqli statement execute error : Field ‘add_to_public_nav’ doesn’t have a default value

Help anyone?

Both of the problems you describe are from upgrades of the plugin not working as they’re supposed to.

The add_to_public_nav column it’s complaining about was removed long ago, but still exists in your database for some reason. (The same is true, even further back, in the opposite direction: an upgrade was supposed to add the use_tiny_mce column).

If you’ve been doing other workarounds of the type you described that could be an explanation. Regardless, the path to fixing this error requires modifying the database. If you’re comfortable doing that, you want to drop the add_to_public_nav column of the simple_pages_pages table.

Thank you! Not sure why tables weren’t fixed back when plugin was updated on 2.1 site (or earlier?) but they are fixed now!