Non-Javascript "Pick this type" button not working

I've just been doing some testing...and it appears that the "Pick this type" button on the item editing form (which is supposed to provide a non-JS alternative to the AJAX attached to the drop-down list) doesn't work. Instead of refreshing the form with a new item type, it simply submits as normal and creates a new item.

The code in question appears to be in application/models/Item.php:

protected function beforeSaveForm($post)

        if (!empty($post['change_type'])) {
        	return false;
        if (!empty($post['add_more_files'])) {
            return false;

        try {
        } catch (Omeka_File_Ingest_InvalidException $e) {
            $this->addError('File Upload', $e->getMessage());

...but while the test for "change_type" works, nothing seems to happen based upon the return value.

Any ideas on how to get it working? Much appreciated!

What version of Omeka are you testing?
What web browser and version are you testing with that gives you the error?


Thanks for getting back to me, Sheila.

I'm currently developing on 1.2, but I've just tested it on 1.21 and the same thing happens.

I've used both Firefox 3.6.8 and Chrome 5.0...but it doesn't really look like it's a browser-related issue to me.

In the code I quoted, the "return false" line in the check for "change_type" is definitely being called (if I add a line to throw an error, the error is displayed), so that suggests that the form values are being submitted correctly. Whatever calls the "beforeSaveForm" function doesn't appear to do anything with the return value....

Many thanks.

I now see what you mean. The type you choose is saved and then you can go back and edit the metadata.

Essentially, we have tried to keep the non-JS option functional, which it is, just with one more step in there.

Ah, I see...I assumed that it would refresh the form in the same way that the JS does. The extra step is a bit confusing, given that there's nothing to tell you what's going on! We're about to put the site through an external accessibility audit, so I think I'll have to see whether I can make it work more smoothly...

Thanks for the clarification, anyway, Sheila. Much appreciated.