Pure PHP Upload 3 Support Product Page

Solved

image field set to null on update

Reported 18 Apr 2013 12:27:42
5
have this problem
18 Apr 2013 12:27:42 phil barnett posted:
I have upgraded to 3.01

Everything works ok when I do an insert record
However when I update the record the image field is set to null

- this occurs if I leave the 'image' field in the form unchanged
(i.e I want to update the text in the record but not the image)

- if I change the 'image' field (i.e I want to update the text field in the record and image) it works ok

Replies

Replied 22 Apr 2013 06:42:00
22 Apr 2013 06:42:00 Miroslav Zografski replied:
Hello Phil,

Do you bind to the file field the corresponding database table to set as default value?

Regards.
Replied 22 Apr 2013 10:31:15
22 Apr 2013 10:31:15 phil barnett replied:
Hi Miroslav,

My file field binds to the column 'image' in the database - there is no default value set for this column. The 'null' checkbox is checked for this column

- does this answer your question?

Regards,

Phil


Replied 22 Apr 2013 10:56:20
22 Apr 2013 10:56:20 Miroslav Zografski replied:
Hello Phil,

As per each other field in update form the file field default value needs to be set to the corresponding column value.

Regards.
Replied 19 Jan 2014 11:45:24
19 Jan 2014 11:45:24 Jim Elliott replied:
I have this problem and I have bound the column to the file input:

<input name="newimage" type="file" id="newimage" onchange="<?php echo $ppu->getValidateCode() ?>;return document.MM_returnValue" value="<?php echo $row_Recordset1['newimage']; ?>" size="32" />

It is blanking the field in the database.
Replied 17 Feb 2014 02:47:39
17 Feb 2014 02:47:39 Luke Johnson replied:
I also have this issue. I am able to upload and insert an image successfully, but when the page is edited a second time (e.g., if I update a text field instead of the file field), the file field value is erased.

I have tried binding the data to the field as its value, but that has no effect.

I've also tried replacing $editFormAction; with $DMX_uploadAction, but no success.
Replied 27 Feb 2014 17:56:34
27 Feb 2014 17:56:34 tim martyn replied:
Same issue here. If I update only one of the images (say, thumbnail), any other images or uploads are overwritten with null value. Very frustrating. Help please...!
Replied 27 Feb 2014 18:07:29
27 Feb 2014 18:07:29 tim martyn replied:
Oh, one more thing. It isn't possible to set a default value to a file field, so that's not a solution.
Replied 27 Feb 2014 19:41:47
27 Feb 2014 19:41:47 tim martyn replied:
Hi
I've looked at the post history of this topic - nobody from the development team has bothered to respond for two weeks. Do you guys think that people buy extensions in the hope they might work? I think that offering an extension on the basis it works with Dreamweaver's Update Record behaviour where it obviously doesn't, is poor. I think the fact that if you don't specify an image to upload then the script adds 'null' values to replace any existing images in the db is a a very basic flaw in the extension, and on that basis I think you guys need to either sort out a fix or remove the extension from sale until you do.
Basically, it's useless until you do.
Replied 10 Mar 2014 14:16:26
10 Mar 2014 14:16:26 David Woolley replied:
I'm also having this problem with updating records using PPU3 & Zip Processor PHP, but with WebAssist Databridge Update Record server behavior. Fine for the first file upload, but loses the filename on the next update. Need to get this working!
Replied 20 Mar 2014 14:23:54
20 Mar 2014 14:23:54 David Woolley replied:
A solution at last!
I reposted the problem here after changing back to DW Update Record:
www.dmxzone.com/support/21571/topic/59365/
Teodor came back with a quick reply.

Cheers
Dave
Replied 26 Mar 2014 16:21:34
26 Mar 2014 16:21:34 Teodor Kuduschiev replied:
Hello,
The issue is fixed in the latest version of the extension. Please update.

Reply to this topic