omeka/plugin-Scripto

'400 Bad request' when importing a document.

Closed this issue · 4 comments

Scripto gives '400 Bad request' when trying to import document to Mediawiki in item transcribe page. This happens with with Scripto 1.3 and also with current development version from Github.

My setup:

Omeka 1.5.1
MediaWiki 1.19.1
PHP 5.3.13
MySQL 5.5.21

Do you mean to say that you get a 400 error after pressing the "Import Document" button?

Omeka gives '200' as a status, but the the actual response says '400' Status: Bad Request' .

Request headers are:

page_action:import-document
page:transcription
item_id:12519
file_id:8478

That seems to be a valid request. The only reason why it would throw a 400 status is if the page or page_action params are invalid, which they aren't. I'm stumped. Would you please post all the request headers. It would also be a huge help if you determined which check in Scripto_IndexController::pageActionAction() is setting the 400 response code. You'll need to comment out the AJAX check and make the request directly like so:

http://example.com/admin/scripto/index/page-action?page=transcription&item_id=12519&file_id=8478&page_action=import-document

Somehow after restarting Apache the problem went away. This is a bit strange, as previously the problem persisted over server restarts. If the issue resurfaces, I'll open the ticket again.