Form build-id mismatch detected while attempting to store a form in the cache.

Error Type: 
Drupal Core
Module: 
Severity: 
Error
Origin: 
watchdog
File name: 
form.inc
Description: 

The Drupal form API will cache a form so that it can be retrieved during such as events as form submission. This facilitates checks on the form such as verifying that submitted form data is valid when compared to the range of possible values defined on the original form.

Cause: 

If you are seeing this error message on screen it tells us that you have some code that is trying to cache the form, but somehow your code is using an invalid build-id. Drupal is preventing the form frombeing cached because it is detecting an inconsistent state.

Solution: 

It is most likely that you have either a custom module or a contrib module that is making a direct call to the form_set_cache().

Start by recursively searching your modules directory, usually found at sites/all/modules, for "form_set_cache".

If you found a match for your search, the next step is to inspect the code around thos matches to find any potential causes of a stale build-id being used, for example any custom caching would be a good candidate.

However, if you find no matches then closer investigation is required. Assuming you are able to generate this error message by repeating the same steps then you should use an interactive debuging session to set a breakpoint on the line this watchdog message is generated. When your breakpoint is hit you can then inspect the callstack in your debugger to find the offending calling code.

If you can find the code that calls form_set_cache() but you cannot find the reason for this error message feel free to send us a code snippet to review.

 

 

 

Expedite

Our aim is to add enough detailed information to each of the Drupal error messages that Drupal developers will be able to fix their own problems. This exercise will take some time to complete, at the last count we had almost 700 error messages in the system.

If your site is suffering from this error message please contact us and ask us to expedite the solution to this error and we will do our best to add a solution as soon as possible.