Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Files uploaded via the field widget Image will result in a failure:
An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /?q=file/ajax/field_image/und/0/form-6dWRmqmRD1bRN8isfO0KmSuFkGUtvbzk7zwQgIMCAUg
StatusText: n/a
ResponseText:
Skip to main content
SmartDPS
Error The website encountered an unexpected error. Please try again later.
Error message
StorageException: in Storage->__construct() (line 19 of /Users/nr18/Workspace/Websites/ProjectX/projectx.stable/sites/all/modules/storage_api/storage.inc).ReadyState: undefined
Comments
Comment #1
rogical CreditAttribution: rogical commentedI think you should post more info, storage configuration , field setting etc.
Comment #2
Dave Sandilands CreditAttribution: Dave Sandilands commentedIt may not be an error specific to storage.
When I try to upload images that are larger than 425Kb, I get this message:
There seems to be quite a few people getting this Ajax error but as yet I haven't seen a solution.
Comment #3
Dave Sandilands CreditAttribution: Dave Sandilands commentedMy particular issue with file uploads was resolved by my host increasing the delay before timeout
ie in php.ini
Comment #4
rogical CreditAttribution: rogical commentedA low network between ftp server and web server?
Comment #5
mizshu CreditAttribution: mizshu commentedI encountered similar Ajax error message as well on an Image field.
The error only occur when the field has "Preview image style" turned on.
In my case, I get it working with either these solutions:
1. Turn off the preview.
Go to 'Manage Fields', click on edit of the field. Under "Preview image style", select " < no preview > ".
2. Patch the code on storage_core_bridge.module.
The issue is coming from DrupalStorageStreamWrapper->getExternalUrl().
The nested "try catch" is not catching StorageException thrown by Storage->construct() -- storage.inc line 19.
I've updated my storage_core_bridge.module to the following:
Comment #6
Perignon CreditAttribution: Perignon commentedIf still an issue please reopen this ticket and we will take a look at it!