<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">No, memcache is not being used.<div><br><div><div>On Aug 23, 2011, at 12:29 PM, Carl Wiedemann wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Are you using memcache on the production server? I've run into problems where cache_form is cleared out when cron runs. If cron runs after a form is first loaded in the browser and before the form is submitted, the cache_form entry is lost because memcache doesn't respect the cache_form lifetime for some reason.&nbsp;Try excluding cache_form from the memcache bins, if possible.&nbsp;<div>
<br></div><div>There may be an issue for this but I didn't check since at the time we didn't need memcache after all.<div><div><br></div><font color="#333333">Carl Wiedemann</font><div><div><font color="#333333">Website design and development consulting</font></div>
<div><font color="#333333"><a href="mailto:carl.wiedemann@gmail.com" target="_blank">carl.wiedemann@gmail.com</a> | skype: c4rlww</font></div></div><br>
<br><br><div class="gmail_quote">On Tue, Aug 23, 2011 at 12:23 PM, Steve Edwards <span dir="ltr">&lt;<a href="mailto:killshot91@gmail.com">killshot91@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have been struggling for a few days with an issue with core form caching that is seen in filefield_sources (D6). &nbsp;When I attempt to add an image using the Reference Existing option, I get the error "An unrecoverable error occurred. This form was missing from the server cache. Try reloading the page and submitting again." Other people have had the same error (see <a href="http://drupal.org/node/500646" target="_blank">http://drupal.org/node/500646</a> and <a href="http://drupal.org/node/795004" target="_blank">http://drupal.org/node/795004</a> for examples.).<br>

<br>
The main thing I'm not understanding is why the data is not being returned from the cache table. &nbsp;First, here is the code from filefield module (the filefield_js() function) that throws the error:<br>
<br>
 &nbsp;// Build the new form.<br>
 &nbsp;$form_state = array('submitted' =&gt; FALSE);<br>
 &nbsp;$form_build_id = $_POST['form_build_id'];<br>
 &nbsp;$form = form_get_cache($form_build_id, $form_state);<br>
<br>
 &nbsp;if (!$form) {<br>
 &nbsp; &nbsp;// Invalid form_build_id.<br>
 &nbsp; &nbsp;drupal_set_message(t('An unrecoverable error occurred. This form was missing from the server cache. Try reloading the page and submitting again.'), 'error');<br>
 &nbsp; &nbsp;print drupal_to_js(array('data' =&gt; theme('status_messages')));<br>
 &nbsp; &nbsp;exit;<br>
 &nbsp;}<br>
<br>
As quicksketch points out in one of the issues, when the form is initially displayed, it should be cached in cache_form, and this error indicates that the form was not cached, and therefore is not retrieved from cache_form (he also points out this is not a filefield issue, but rather a core caching issue). &nbsp;However, in watching the db, I can see that the form is saved in the cache (and I verified it using the form id displayed in the HTML against the cid value in cache_form), so it is there for to be retrieved by form_get_cache(). &nbsp;The only other option I can see is that $_POST['form_build_id'] is not available for some reason.<br>

<br>
What makes this more difficult is that I can't duplicate this on my local machine or our dev server. &nbsp;This only happens on the production server at the hosting company. &nbsp;Varnish is being used, but since this functionality is only used for logged in users, that should be an issue as far as I can tell.<br>

<br>
Can anyone offer any suggestions on how to fix this?<br>
<br>
Thanks.<br>
<br>
Steve<br>
<font color="#888888">--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><br></div></div>
-- <br>[ Drupal support list | <a href="http://lists.drupal.org/">http://lists.drupal.org/</a> ]</blockquote></div><br></div></body></html>