Forums » Delete an Existing Item Type Element

RSS feed for this topic

Info

  1. Hello!
    First, excuse me for my imperfect english. I'm French-canadian.
    I red the codex page about Managing Item Types. So I did some corrections in elements' descriptions that I already created. Everything was fine.

    But I also deleted one element. It was a useless element for a test. Now, when I try to create a new element with the admin interface, an error occurs : Omeka_Record_Exception - There are too few values in the element ordering array.

    Backtrace

    exception 'Omeka_Record_Exception' with message 'There are too few values in the element ordering array.' in /home/mnem8896/public_html/adapi/adapi/application/models/ItemType.php:178
    Stack trace:
    #0 /home/mnem8896/public_html/adapi/adapi/application/controllers/ItemTypesController.php(94): ItemType->reorderElements(Array)
    #1 /home/mnem8896/public_html/adapi/adapi/application/libraries/Zend/Controller/Action.php(513): ItemTypesController->editAction()
    #2 /home/mnem8896/public_html/adapi/adapi/application/libraries/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('editAction')
    #3 /home/mnem8896/public_html/adapi/adapi/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #4 /home/mnem8896/public_html/adapi/adapi/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
    #5 /home/mnem8896/public_html/adapi/adapi/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
    #6 /home/mnem8896/public_html/adapi/adapi/application/libraries/Omeka/Core.php(166): Zend_Application->run()
    #7 /home/mnem8896/public_html/adapi/adapi/admin/index.php(45): Omeka_Core->run()
    #8 {main}

    I don't have a great knowldege in php/mySQL, but I suppose that is because of the element I deleted. Is there a way to manage that?

    Thanks in advance for the help!

  2. I'm not completely sure what's happening here.

    Do you get this error when adding an element to any item type, or just a specific one? When you manually deleted the element, had you removed the element from all the Item Types it was in first?

  3. I get this error when adding an element to any item type. And yes, the element I deleted wasn't associated with any item type.

    I wanted to delete it because, even if I deleted the element in the admin interface, it appears in the "Narrow by specific fields" field in the advanced search form.

    Did I was wrong to delete it directly in the data base? Or is there another way to delete it completly? If not, maybe it can be an amelioration to the next version?

  4. You should only run into this problem if you delete an Element but leave rows in the item_types_elements table that refer to the ID of the element you deleted.

  5. Thanks a lot!

    Now I see that I forgot to delete the element in the item types, even if I was sure that I did it...

    Thanks again!

Reply

You must log in to post.