close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Blank update deletes file

Thread began 11/17/2009 8:35 am by John Langer | Last modified 11/18/2009 5:43 pm by John Langer | 1833 views | 7 replies |

John LangerBeta Tester

Blank update deletes file

Sorry to jump on the band wagon with this but I too am having problems in retaining an existing file upload that's inserted in the database.

I'm attaching the zipped file in question. Perhaps you could have a look.

In this case I have 5 image upload fields on an update page. You can insert the image OK but if you do a blank update it deletes the existing file.

I've been researching this for over a day now and so I feel I've wasted enough time trying to solve this so could you help please.

Sign in to reply to this post

Cologne

Do you have the right trigger: "if image uplad successful"

this should work

Sign in to reply to this post

John LangerBeta Tester

Originally Said By: Cologne
  Do you have the right trigger: "if image uplad successful"

this should work  



Thanks for the suggestion but that didn't work I'm afraid. I have the trigger set to the form submit button being pressed. This uploads a new file and enters the file name in the database but if pressed without uploading a new file, it does not retain the info in the database (it deletes it). All this despite following the guide for this very thing found here http://assets.webassist.com/how-tos/dfp_da_insert_update_ht.pdf

Sign in to reply to this post

Jason ByrnesWebAssist

To trouble shoot this, change line 203:
$WA_redirectURL = "users_Images.php";

to:
$WA_redirectURL = "";

so that no redirect happens after updating the database.


Then add the following code for turning on error reporting at line 1:

php:
<?php
error_reporting
(E_ALL);
ini_set('display_errors','on');
?>




next add this code after the <body> tag.

Post back any PHP errors that may display and the results of the DFP debug info after testing.

Sign in to reply to this post

John LangerBeta Tester

Solved

Hi jason,

Many thanks for looking into this but because of the time delay between the UK and the west coast of the US I have had all day to really have a go at this. It turns out to be a simple "error" on my part. Not really an error but "it wasn't in the manual" so I didn't do it.

The problem stemmed from the fact of uploading two images (the 2nd being a thumbnail). In the DFP behaviour I inserted the default hiddenfile valuefor the main image but left this blank for the thumbnail. As this data was not being inserted into the database but merely uploaded to another folder, It didn't seem logical to me to have to give the thumbnail a default value.

Well the answer is that you do. By just placing the same default value in for the thumbnail as for the main image it stopped the database from being deleted.

Problem solved.

Sign in to reply to this post

Jason ByrnesWebAssist

excellent, glad to hear you have it working.

Sign in to reply to this post

CraigRBeta Tester

Hey John, I am also in the UK, and pretty new to DFP, (previously used D. Powers hand built solution).

Anyway to keep it short, I have a ticket open on this same problem.
If I get no joy within the next few days, can I drop you a message ?

Regards

Sign in to reply to this post

John LangerBeta Tester

Originally Said By: CraigR
  Hey John, I am also in the UK, and pretty new to DFP, (previously used D. Powers hand built solution).

Anyway to keep it short, I have a ticket open on this same problem.
If I get no joy within the next few days, can I drop you a message ?

Regards  



Of course you can. We can only try :)

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...