Yes, this is about the dreaded "Unrecoverable Error." First, I realize this issue has been addressed numerous times from various angles. However, while there have been several cases that have been solved, many have been left unanswered or with additional comments after the case is closed along the lines of “I’m still having this issue without these variables...” etc. It appears our problem is an entirely new species.

The symptoms:
When uploading any file via a CCK file field or image field, the following error appears and the entire field disappears after clicking “Upload” or “Remove:”

An unrecoverable error occurred. This form was missing from the server cache. Try reloading the page and submitting again.

A workaround for adding files is to forgo clicking “Upload” and instead simply “Save” the content type. But it is very inconvenient to not be able to remove or replace files once they have been uploaded.

The system:
Linux Apache 2.2.14
PHP 5.3.2
Drupal 6.2
Postgresql 9.0
Suhosin 0.9.29

CCK 6.x-2.9
Filefield 6.x-3.9
Imagefield 6.x-3.9

Eliminated Variables:
Again, this issue has been addressed multiple times in the past, each having been “solved” after a variable was found that was causing the problem. We have eliminated the following problems on our original install:

  • NOT a problem with memcache or cacherouter as we do not have these installed:
(addressed in http://drupal.org/node/795004, http://drupal.org/node/683298, http://drupal.org/node/500646)
  • NOT a conflict with popup module as we do not have it installed:
    (addressed in http://drupal.org/node/539476, http://drupal.org/node/1032992)
  • NOT a post_max_size, database corruption, php.ini or .htaccess issue - all patches applied, variables changed with no success.
    (all addressed in http://drupal.org/node/539476)
  • NOT a Suhosin file size issue - variables changed with no success
    (addressed in http://drupal.org/node/539476, http://drupal.org/node/423478)


    After having no success trying to fix this problem on our current install, we attempted to recreate the problem from a base install with just CCK, Filefield & Imagefield. The error DID NOT occur even with the following changes:
  • Roll back to Drupal 6.19, PHP 5.2
  • Remove Suhosin completely
  • Change OS, OS version


    
With only the database left, we addressed a problem that had occurred when we versioned up from Postresql 8.4 to 9.0 in early February, which completely broke the site and gave this error on a white screen:

    Notice:  unserialize() [function.unserialize]: Error at offset 0 of 65545 bytes in /var/www/public_html/drupal/includes/cache.inc on line 33

    So we had made the following changes to cache.inc on line 33:

    "$cache = db_fetch_object(db_query("SELECT data, created, headers, expire, serialized FROM {". $table ."} WHERE cid = '%s'", $cid));"

    TO

    "$cache = db_fetch_object(db_query("SELECT E'\\data', created, headers, expire, serialized FROM {". $table ."} WHERE cid = '%s'", $cid));"

    After making this change on our fresh install, we started getting the unrecoverable error. So it appears this is where our problem begins. Also, if we try to remove the change we made in cache.inc, all we get back is a page with garbled letters and numbers, so it appears the patch is non-reversible.

    Upgrading to Drupal 7 is not an option right now, nor is downgrading Postgres or switching to MySQL.

    Where do we go from here? Any suggestions and questions would be appreciated - I will be monitoring this thread closely.

  • Comments

    susanconnick’s picture

    Version: 6.20 » 6.22

    Had the same problem with both 6.20 and 6.22. I'm new to Drupal, but just fixed this problem for our site. Hope I didn't break anything else though:). Before I tried the CCK FileField, I was having almost the same problem with the Core Upload module (actually the Core Upload is what I really fixed not the FileField). That Core Upload mod. error was "Validation error, please try again. If this error persists, please contact the site administrator...." Anyway the problem for both modules is definitely related to caching. Learned that from mostly reading your thread. With information that I learned here, I was able to be a bit more creating with my google search. And what I did was the following:

    1. Enabled my Core Upload module, disable the CCK FileField.
    2. Went to Administrator >> Site Configuration Performance >> Under Page Caching changed the value to NONE.
    3. Immediately I was able to upload documents, but received two warnings about missing arguments, "warning: Parameter 2 to date_form_alter() expected to be a reference, value given in \includes\common.inc on line 2892. " And the solution to that problem was found at the hashbangcode website found below.

    http://www.hashbangcode.com/blog/drupal-6-upload-module-reference-warnin...

    Hope this helps.
    Susan

    bendiy’s picture

    If you are on PostgreSQL 9.x, you need to modify the "bytea" data type:

    Running this on the database should fix it without modifying the cache.inc code:

    ALTER DATABASE databasename SET bytea_output='escape';
    

    http://stackoverflow.com/questions/5623786/php-unserialize-error-at-offset

    Status: Active » Closed (outdated)

    Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.