Hello everyone,

We are experiencing an strange issue after updating the core from 6.22 to 6.25 (we did not upgrade directly, we did a commit for each version). When we try to upload a file/image via CCK or using IMCE the upload bar gets frozen, although the file is properly uploaded to the server. This is only happening for the superuser, and for users with the admin role, so we thought it might be due to the permissions configuration, but the only related permission with respect to other roles is 'administer files', and changing it did not provoke any result.
We have tried the following, without success:

  • Use or not the throttle, and it seems it is not related.
  • Create different filefields (image, non-image, etc.) in a new test content type. It did not work neither
  • Debug the code locally, but in this case it works. Our site is stored in Acquia, so we assume the configuration of the permissions and the php settings is ok
  • Revert the code and db to 6.22. In that case, it works.
  • Revert files.inc and the module upload to the one provided in 6.22. In that case, it does not work

We were suspecting of the following piece of code in the function function upload_js() (l.573) of the module upload

6.25


  $empty_form_state = array();
  $data = &$form;
  $data['__drupal_alter_by_ref'] = array(&$empty_form_state);
  drupal_alter('form', $data, 'upload_js');

6.22

  drupal_alter('form', $form, array(), 'upload_js');

These are some screenshots of the problem:
- http://postimage.org/image/wsdmyjkzx/
- http://postimage.org/image/nreazv8a3/

We captured the http packages with httpfox, and these are the differences depending on the role:

Response while uploading an admin account


(Status-Line)	HTTP/1.1 200 OK
Server	nginx
Content-Type	text/javascript; charset=utf-8
Expires	Sun, 19 Nov 1978 05:00:00 GMT
Cache-Control	store, no-cache, must-revalidate, post-check=0, pre-check=0
Last-Modified	Mon, 26 Mar 2012 11:16:43 GMT
X-AH-Environment	dev
Content-Length	53
Date	Mon, 26 Mar 2012 11:16:43 GMT
X-Varnish	788823207
Age	0
Via	1.1 varnish
X-Cache	MISS
Connection	keep-alive

Response using a different role

(Request-Line)	POST /filefield/ahah/blog_topic/field_blog_topic_thumbnail/0 HTTP/1.1
Host	dev.informe-espana.es
User-Agent	Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language	es-es,es;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding	gzip, deflate
Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection	keep-alive
Referer	http://dev.informe-espana.es/node/add/blog-topic
Cookie	SESSa7a0e81643d6289d37cd3bdda68afe5b=3mur5thfk3ofi2ggu6851sjnb5; __utma=171249845.37101949.1332499019.1332499019.1332759433.2; __utmz=171249845.1332499019.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=171249845.12.10.1332759433; Drupal_l10n_client=0; __utmc=171249845; has_js=1
Content-Type	multipart/form-data; boundary=---------------------------265001916915724
Content-Length	107600


(Request-Line)	GET /sites/default/files/imagefield_thumbs/site-uploads/blog_topic/u311/Invierno_0.jpg?1332760995 HTTP/1.1
Host	dev.informe-espana.es
User-Agent	Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Accept	image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language	es-es,es;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding	gzip, deflate
Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection	keep-alive
Referer	http://dev.informe-espana.es/node/add/blog-topic
Cookie	SESSa7a0e81643d6289d37cd3bdda68afe5b=3mur5thfk3ofi2ggu6851sjnb5; __utma=171249845.37101949.1332499019.1332499019.1332759433.2; __utmz=171249845.1332499019.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=171249845.12.10.1332759433; Drupal_l10n_client=0; __utmc=171249845; has_js=1


(Status-Line)	HTTP/1.1 200 OK
Content-Length	1987
Server	nginx
Content-Type	image/jpeg
Last-Modified	Mon, 26 Mar 2012 11:23:16 GMT
Cache-Control	max-age=1209600
Expires	Mon, 09 Apr 2012 11:23:16 GMT
X-AH-Environment	dev
Date	Mon, 26 Mar 2012 11:23:16 GMT
X-Varnish	788832076
Age	0
Via	1.1 varnish
X-Cache	MISS
Connection	keep-alive

Does anyone have any clue about what can be the reason for this behaviour?.

Thanks a lot,

David

Comments

gandhiano’s picture

Hi David,

I'm experiencing a similar problem, but using Drupal 7.12 and only when Theme Editor (2.x-dev) is enabled.

In my case, this seems related to an invalid JSON (see my bug report http://drupal.org/node/1529028). Would be nice to know if it's a similar issue and get some more tips on where we can patch this.

drozas’s picture

Hi gandhiano,

I have subscribed to the issue you created in the IMCE queue (http://drupal.org/node/1529028), but in this case is happening not only with IMCE, we are experiencing a similar issue when trying to upload via a cck field.I will let you know if we make some progress.

Thanks!,

David