The FileField.module upload javascript fails if the user also has permissions to see the memcache stats. This is because stats are being attached to every page on shutdown.

According to a comment in the filefield.module "For some reason, file uploads don't like drupal_json() with its manual setting of the text/javascript HTTP header. So use this one instead.". No specific HTTP header is defined, and thus the detection code in memcache module is passed and the stats added to the javascript.

Filefield.module, like others, knows about devel.module which also adds stats in the shutdown process. Perhaps its safer to simply support the $GLOBALS['devel_shutdown'] == FALSE detection that devel.module does?

I came across this exact same problem with some ajax code in a custom module earlier this week, and blogged about it at http://www.ixis.co.uk/blog/drupal-footer-output-ajax-calls

Comments

robertdouglass’s picture

I'd be fine with the globals solution proposed. Care to write a patch?

jeremy’s picture