I've posted this to Attachment issues (http://drupal.org/node/207657), but thought I'd post here too in hope of a quick response from anyone who might have had this problem and solved it.
I have Filemanager and Attachment installed and enabled, and Upload disabled. The Attachments form fieldset shows up as it should in my CCK node creation form, and appears to function as it should, at least for the first step: uploading the file. The file does get uploaded to the 'working' directory, and does show up as attached in the node creation form BEFORE the form is submitted.
AFTER the form is submitted, though, there is no indication in the node display that the file has been uploaded or is associated with the node.
The first time I tried it, it worked perfectly, but since then, the file does not appear to be attached to the node. It just sits there in the 'working' directory, never gets moved, and the {file} and {attachment} tables never get updated to show the file as attached.
I am using the workflow and workflow_required_fields modules as well. I'm pretty sure those were already installed and configured the first time I tried using Attachment--the time that it worked--but maybe not.
Has anyone run into a similar issue? I note http://drupal.org/node/54064, but a) that's for 4.7 and b) I don't understand the 'workaround' proposed there.
Comments
As it turns out...
As it turns out, it was something I had done with hook_form_alter in a custom module. I was changing the value of the Submit button to "Proceed." Attachment.module looks at this value to decide whether to promote the file from "working" to "active," and it wasn't seeing what it needed to see. So, for my application, I ended up modifying attachment.module slightly at line 155, changing
if (($_POST['fileop'] == t('Add')) || ($_POST['op'] == t('Preview')) || ($_POST['op'] == t('Submit'))) {to
if (($_POST['fileop'] == t('Add')) || ($_POST['op'] == t('Preview')) || ($_POST['op'] == t('Proceed')) || ($_POST['op'] == t('Submit'))) {That shouldn't break it for any other use; I just have to remember to perpetuate the change when I update attachment module.