If component already have file uploaded, it do not display it. It is very easy fix. Patch attached.

Comments

quicksketch’s picture

Thanks, this looks like a legitimate bug and a good fix to me, though I'm not quite sure how to reproduce the problem. I can see where it arises though, if the $element array contains a property as the first option (such as #title) instead of the upload field itself, nothing will be displayed.

I'd like to just confirm the problem and check the fix, but this looks good to me.

quicksketch’s picture

Title: [PATCH] bug in File component theme function » File component may not show existing file uploads
Status: Needs review » Fixed

I couldn't reproduce this problem but I see what it's fixing. After testing I couldn't see any new problems so I've committed this patch to the Drupal 6 branch. Drupal 7 has a complete different file component now, so there weren't any changes needed there. Thanks for the patch!

pavel.karoukin’s picture

If I remember correctly, it happens when you go between pages of multi-page webform -- when you go back and forth. You are correct regarding D7 branch - there no patch needed since it uses core File component.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.