I've searched for bugs related to my situation but didn't find any.

This is a fresh 6.16 install.

Scenario 1: Create a new page, attach a file and click Save. The attachment is listed fine.
Scenario 2: Create a new page, browser for a file and attach it (List is selected by default), preview the node, the attachment is there and click on Save. The attachment is lost, although it has already been uploaded in the files directory as configured in administration. It doesn't matter if after browsing for the file the Attach button is clicked before clicking on the Preview button. The file is uploaded, but disappears after Save.

I'll test 7.0-alpha2 if this issue remains.

Comments

GoofyX’s picture

OK, just tested it in 7.0-alpha2 and it works as expected. 6.x is only affected by this issue.

ggause’s picture

I have the same issue, but taken one step further. After attaching a file and saving the node, the file is uploaded but not attached to the node. Viewing the node again under edit shows no attachments, but it is on the server. If I select preview after attaching but before saving, then it shows the attachment. But when I save (with or without preview) the file is not attached. Same setup as this issue, fresh install of 6.16 using upload module.

I'm at a loss.

GoofyX’s picture

Yes, forgot to report in the initial message, that the file is indeed uploaded to the server.

vr_mex’s picture

Priority: Normal » Critical

This is a critical issue in core;

After uploading a file and saving the node, the file is uploaded but it is not attached to the node;
the {upload} table does not have an entry for it,
there is an entry for it on the {files} table.

Viewing the node again under edit tab, shows no attachment,
but the uploaded file is on the server under /sites/default/files
and there is an entry for it on the {files} table,
but there is not an entry for it on the {upload} table.

If I select preview after uploading but before saving, then it shows the attachment in the preview,
but when I save (with or without preview) the file is not attached.
Same setup as this issue, fresh install of 6.16 using upload module and redhat linux.

Please help:
How can I fix the uploaded files so they show up in theire correct nodes as attachments?
is it an issue of manually adding a new row with the correct info for the fields in the {upload} table?
are there other tables affected that should be taken into consideration?

This was not happening before the update to Drupal 6.16

This issues seem to be similar too:
http://drupal.org/node/323438
http://drupal.org/node/736134

Please help.

advseb’s picture

I can confirm this bug. It must have been introduced with the recent 6.16 release.

The attachement is shown if the user directly "submits" the node without generating a preview. If he previews the post first, the attachement is still shown in the edit form, but after submitting it, it is lost.

rewe’s picture

hi -

same here: attachment does not show up in the published node when previewing the node before saving it.

rewe’s picture

hi -

have a look at http://drupal.org/node/323438

#8 by mfb did the trick ..

GoofyX’s picture

Status: Active » Closed (duplicate)

Indeed. So, this bug is a duplicate of #323438: New upload lost if previewing before saving.