I'm using 4.7 beta 4, PHP 4.4.2. The problem is that file attachments are never displayed the first time that I submit a post. I have to edit the post and re-check the "List" checkbox to have them displayed.

I have file attachments enabled. When I submit a blog or forum topic, I click on "File Attachments, click the "Browse" button, navigate to my document, and click open. The path to my document is put in the edit box.

I click "Attach" and watch the cool spinny bar thing work it's magic. After it is done, the file name appears in the File Attachments list with the right path, right size. I make sure that "List" is checked, then I click the "Submit" button and everything seems good.

When I view the post, though, the file is not listed as "attached" to the posting. I have to "Edit" the posting. When I do, "List" is *not* checked. I check it again, click "Submit" and it's now in the post as "attached."

I did not use attachments with my previous install of drupal, so I don't know if I am doing something wrong or if this is a new bug.

Comments

wulff’s picture

I'm experiencing the same problem.

A brief investigation shows that at the end of the 'validate' block in upload_nodeapi, $node->files contains:

[upload_0] => stdClass Object
                (
                    [filename] => foo.jpg
                    [filepath] => c:\windows\temp/foo.jpg
                    [filemime] => image/jpeg
                    [error] => 0
                    [filesize] => 123575
                    [source] => upload_0
                    [list] => 1
                    [_filename] => d:/temp/foo.jpg
                )

while a few moment later, in the insert/update block, it contains:

[upload_0] => stdClass Object
                (
                    [filename] => foo.jpg
                    [filepath] => c:\windows\temp/foo.jpg
                    [filemime] => image/jpeg
                    [error] => 0
                    [filesize] => 123575
                    [source] => upload_0
                    [list] => upload_0
                    [_filename] => d:/temp/foo.jpg
                    [remove] => 0
                    [description] => foo.jpg
                )
junyor’s picture

Status: Active » Closed (duplicate)
csieber’s picture

I am having a more severe problem along these lines. I can attach a file normally, and when I hit "Preview", the link to the file appears as normal and loads on click. When I "Submit" the new content (page/story/forum topic; it doesn't matter) the file no longer displays, an upon editing is no longer there!

Help! :P
--
Christian S.
BYU