I'm a bit timid about posting this as a bug because it only appears to be a problem with a Pressflow install.

Anyway. What happens is that when a JavaScript function is called via the "choose", "remove" or "transfer" buttons the field entirely disappears.

First I thought this was a JS/Ajax problem (I still think it's most likely an Ajax one) but then I went through the Drupal/Pressflow include files and this seems to be residing in either common.inc or bootstrap.inc.

Anyone have similar problems or an idea of how to fix this?

CommentFileSizeAuthor
ffsb1.jpg22.84 KBkarljohann

Comments

david strauss’s picture

The fact that the problem may be related to common.inc or bootstrap.inc does not, in any way, indicate that this may be a Pressflow issue. The only way to determine if it is a Pressflow issue is to swap in standard Drupal core and see if the problem persists.

karljohann’s picture

Already done that. That's why I know it's a Pressflow issue.

david strauss’s picture

The only change in Pressflow that would affect AJAX is using the native PHP JSON encoding instead of a Drupal one, but that's the same change that's in Drupal 7, so you may be seeing reliance of this module on a glitch in the Drupal 6 JSON encoder.

david strauss’s picture

If you can catch us on the #pressflow IRC channel on Freenode, we can work through this in more detail.

david strauss’s picture

I've posted this as bug #514941 on Pressflow's Launchpad project:

https://bugs.launchpad.net/pressflow/+bug/514941

ManyNancy’s picture

Subscribe.

karljohann’s picture

Yep, that's exactly it, the problem lies in the drupal_to_js function.

I have to admit I'm not familiar enough with the architecture of Drupal -> filefield -> imagefield -> filefield sources to figure out exactly what javascript is causing this so I just replaced the drupal_to_js function in Pressflow with the one from Drupal 6. For now that'll have to do.

Thanks a lot David, big fan of your work :)

quicksketch’s picture

Status: Active » Closed (fixed)

Unless there's something that can be done in FileField Sources, it doesn't make sense to keep this open here.