close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DFP 2.1 whole new suite of errors

Thread began 7/06/2009 1:43 pm by dreamweaver41056 | Last modified 7/07/2009 3:25 pm by dreamweaver41056 | 2716 views | 15 replies |

dreamweaver41056

DFP 2.1 whole new suite of errors

I updated DFP 2 to DFP 2.1 this morning and now I have problems and more problems.

1) Added file field to insert form and added upload behavior. All of my information was populated correctly.
2) Modified insert behavior to populate image and thumbnail fields
3) Tested the page and the only thing that happened was the default file name was populated, in this case ../images/spacer.gif

So I decided to go through the page again to make sure everything was right. First I compared it to a page I built a month ago s ago using DFP 2 with the new helper file provided as a temporary patch for the DFP 2 extension. Upon this examination everything looked correct. I tested the old page to make sure it was still uploading and populating correctly and it was.

Then I clicked the server insert behavior on the new page and get the following error,

"'While executing onLoad in WAAB_Insert_SB.htm, the following JavaScript error(s) occurred:

In file "WAAB_Insert_SB";
initializeUI is not defined'"

Tried to inspect the behavior on the good working file and get the same error.

Closed and restarted Dreamweaver and get the same error on every page with an insert behavior.

So, it appears that DFP 2.1 has broken Data Assist (which I did not update) or Dreamweaver.

Now I'm dead in the water and can't do the work my clients were depending on me to do.

Sign in to reply to this post

Ray BorduinWebAssist

Please delete your winfilecache .dat file with DW closed. That will fix these errors. It is a problem with the cached version not matching after updates and a false error being reported by DW.

Sign in to reply to this post

dreamweaver41056

DFP 2.1 still broken

Originally Said By: Ray Borduin
  Please delete your winfilecache .dat file with DW closed. That will fix these errors. It is a problem with the cached version not matching after updates and a false error being reported by DW.  



I deleted the winfilecacheXXX.dat file and that corrected the DataAssist error but the file upload is still not working.

Here is my code:

<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../prodimages/",
'FileName' => "[FileName]",
'DefaultFileName' => "../images/spacer.gif",
'ResizeType' => "2",
'ResizeWidth' => "650",
'ResizeHeight' => "0",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
'UploadFolder' => "../prodimages/",
'FileName' => "[FileName]_thumb",
'DefaultFileName' => "../images/spacer.gif",
'ResizeType' => "2",
'ResizeWidth' => "200",
'ResizeHeight' => "0",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "ensembleImage", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

OK... do you get an error or what happens. I would have to have a complete description of the problem and the entire page to tell why something might not work.

Even then if it is a server configuration error of some sort there may not be a problem to spot.

I guess what I am saying is that that part of the code looks correct to me.

Sign in to reply to this post

dreamweaver41056

No error messages

No errors and the pages that I built a month ago are all working fine. The upload code for the older page I alluded to is almost identical and it works fine.

--------older working page upload params------

// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../prodimages/",
'FileName' => "[FileName]",
'DefaultFileName' => "../prodimages/clear.gif",
'ResizeType' => "2",
'ResizeWidth' => "450",
'ResizeHeight' => "0",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
'UploadFolder' => "../prodimages/",
'FileName' => "[FileName]_thumb",
'DefaultFileName' => "../prodimages/clear.gif",
'ResizeType' => "3",
'ResizeWidth' => "0",
'ResizeHeight' => "200",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "ProdImage", "3", "[ExistingFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}

Sign in to reply to this post

Ray BorduinWebAssist

You can access any error messages for the failed upload from the bindings panel.

I would have to look at the whole page to see the problem. It doesn't appear there is a problem in the code you are providing so the issue has to be elsewhere.

Sign in to reply to this post

dreamweaver41056

bindings panel?

Originally Said By: Ray Borduin
  You can access any error messages for the failed upload from the bindings panel.

I would have to look at the whole page to see the problem. It doesn't appear there is a problem in the code you are providing so the issue has to be elsewhere.  




I added a debug block to the top of the page and still got no errors. I have not looked at the server logs but will do that shortly. What do you mean "error messages...bindings panel"?

Sign in to reply to this post

dreamweaver41056

PHP Notice: Undefined variable: firstFile in /var/www/vhosts/foofoofoo.com/httpdocs/WA_DigitalFilePro/HelperPHP.php on line 334,

Sign in to reply to this post

dreamweaver41056

else{
$fileParams = func_get_arg(5);


foreach($fileParams as $key=>$val){
$defaultFileName = $val["DefaultFileName"];
$WA_DFP_UploadStatus[$statusName][$key]["statusCode"] = 0;
$WA_DFP_UploadStatus[$statusName][$key]["serverFileName"] = $defaultFileName;
$path_parts = pathinfo($defaultFileName);
$WA_DFP_UploadStatus[$statusName][$key]["fileExtension"] = '';
$WA_DFP_UploadStatus[$statusName][$key]["errorMessage"] = "No file uploaded";

$counter = 0;


if($counter == 0){ // set first upload values into V1 status values
$_SESSION[$sessionName] = $defaultFileName;
foreach($WA_DFP_UploadStatus[$statusName][$key] as $subkey=>$subval){
$WA_DFP_UploadStatus[$statusName][$subkey] = $subval;
}
}
$counter++;
}
}
if (file_exists($firstFile)) {
unlink($firstFile);
}
return;
}

Sign in to reply to this post

Ray BorduinWebAssist

Maybe debug with:


<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1") ;
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "ProdImage", "3", "[ExistingFileName]_[Increment]", "true", $WA_UploadResult1_Params);

var_dump($WA_UploadResult1_Params);
die();
}

Sign in to reply to this post
loading

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...