Error when added tags

I'm using Omeka 2.2.2 and when clicking Save Changes after adding tags to an item, the message' Omeka encountered an error' shows up.

How do I find more specifics?

To retrieve error messages: Open the .htaccess file in the root of your Omeka installation, find the following line, and uncomment it (that is, remove the # sign):
# SetEnv APPLICATION_ENV development

Thanks! Here's the log:

#0 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('INSERT INTO `om...', Array)
#3 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#4 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Db.php(252): Omeka_Db->__call('query', Array)
#5 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Db.php(252): Omeka_Db->query('INSERT INTO `om...', Array)
#6 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Record/AbstractRecord.php(543): Omeka_Db->insert('RecordsTags', Array)
#7 /home/sunyoneonta/cgpcommunitystories.org/application/models/Mixin/Tag.php(53): Omeka_Record_AbstractRecord->save()
#8 [internal function]: Mixin_Tag->afterSave(Array)
#9 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Record/AbstractRecord.php(251): call_user_func_array(Array, Array)
#10 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Record/AbstractRecord.php(280): Omeka_Record_AbstractRecord->delegateToMixins('afterSave', Array, true)
#11 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)
#12 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Controller/AbstractActionController.php(209): Omeka_Record_AbstractRecord->save(false)
#13 /home/sunyoneonta/cgpcommunitystories.org/application/controllers/ItemsController.php(89): Omeka_Controller_AbstractActionController->editAction()
#14 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Zend/Controller/Action.php(516): ItemsController->editAction()
#15 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('editAction')
#16 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#17 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(101): Zend_Controller_Front->dispatch()
#18 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#19 /home/sunyoneonta/cgpcommunitystories.org/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#20 /home/sunyoneonta/cgpcommunitystories.org/admin/index.php(28): Omeka_Application->run()
#21 {main}

How do I fixed it?

This looks like a bug in older versions of Omeka. Upgrading to the latest version should fix it.