uploadForm3 - upload info issue

7 posts by 2 authors in: Forums > CMS Builder
Last Post: May 4, 2016   (RSS)

By Steve99 - May 3, 2016

Hello,

This question relates to uploadForm3 being used with CMSB 3.02 and Website Membership 1.11.

In brief, preceding upload info data is being overwritten by subsequent upload info data.

Detail:

  • When performing "Add" record with uploads, the first upload works fine and retains the user input upload title (info1).
  • After a second upload, info1 on the first upload is overwritten and shows as what the user input for upload title (info1) on the second upload.
  • On a third upload, that user input for upload title (info1) overwrites the first two uploads info1 (so on and so forth).

Thanks in advance.

Regards,
Steve

By gregThomas - May 3, 2016

Hi Steve, 

Would it be possible to attach the version of the uploadForm3 you're using to a post?

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gregThomas - May 4, 2016 - edited: May 4, 2016

Hi Steve, 

I've fixed the issue, I changed line 82 of uploadForm3_iframe.php from this:

$infoQuery .= " preSaveTempId = '$preSaveTempId'";

to this:

$infoQuery .= " preSaveTempId = '$preSaveTempId' ORDER BY `createdTime` DESC LIMIT 1";

The problem was the MYSQL statement would update all of the uploads with the same pre save temp ID with the info1 and info2 field data instead of the only the latest record. 

I've also attached the updated versions of the files to this post. 

Where did you download the copies of these forms, did you get them from another forum post? 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Steve99 - May 4, 2016

Hi Greg,

Great, thank you. Yes, I had downloaded the files from a different forum post. I've updated the code line accordingly and all is well.

P.S. It appears the attached uploadForm3_iframe.php file does not contain the code update.

Thank you,
Steve

By gregThomas - May 4, 2016

Hey Steve,

I've updated the previous post so that it contains the correct version of the uploadForm3_iframe.php

I'll see if we can get an official download link setup for the uploadForm3 files as there are several different versions of them on the forum. It would be good to have a central location where everyone can get the latest version.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Steve99 - May 4, 2016

Hey Greg,

Agree, that would be great.

Thanks again for your assistance, much appreciated.

Cheers,
Steve