close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error when adding DFP

Thread began 4/19/2012 1:00 pm by bill3786 | Last modified 4/20/2012 1:23 pm by bill3786 | 1134 views | 8 replies |

bill3786

Error when adding DFP

Trying to add DFP to products_insert page and getting this error, any suggestions.

Warning: require_once(../webassist/file_manipulation/helperphp.php) [function.require-once]: failed to open stream: No such file or directory in /homepages/23/d401946138/htdocs/En7wDdy4/products_Insert.php on line 2

Fatal error: require_once() [function.require]: Failed opening required '../webassist/file_manipulation/helperphp.php' (include_path='.:/usr/lib/php5') in /homepages/23/d401946138/htdocs/En7wDdy4/products_Insert.php on line 2

Attached Files
products_Insert.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the error suggests that the webassist/file_manipulation/helperphp.php file has not been uploaded to the server, make sure to upload that file.

Sign in to reply to this post

bill3786

Ok, thanks, solved that problem.

1. On the product_update page I can't get the hidden field to display the value from the database, the field is blank.

2. Can't test it yet but I deviated from the tutorial for "Adding DFP to DataAssist Insert & Update Pages" by adding the field from the recordset in the Default file value (as described in showthread.php?t=25250) instead of the field from the WADAUpdateForm as described in the tutorial.

Is this correct in order to leave the image details unchanged if the update is only to the other text fields.

Attached Files
products_Update.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the hidden field is set to use the $row_WADAproducts['ProductImage'] value.

this is the same value you have used for the default file.

if it doesn't work for the hidden element, i don't see why it would work for the default file....


The correct method is to bind the hidden element to the recordset value and use the hidden element as the default file.

you say:

  On the product_update page I can't get the hidden field to display the value from the database, the field is blank.  



how are you checking this? are you looking in the page source, that is the only way you will see if the field has a value or not.

Sign in to reply to this post

bill3786

Ok, I've changed the default file to be the hidden element. I'm a bit confused by what I should be seeing.

Please could you clarify what should happen when updating a product record from the database when using DFP. I assumed that by changing input type from text to hidden on the image name field, the existing product image name from the database would be displayed in the field to the left of the browse button, is this correct? It doesn't display anything for me in this field.

Then if a different image was required, the browse button was used to find it and it would be displayed in the field and then uploaded to the database for this product.

If the update did not involve a change of image but to one or more of the other text fields then the "if file exists" option set to "skip upload" would simply update the text fields and ignore any file upload. Is this correct?

I was thrown by following the post here showthread.php?t=25250
What is the point being made in this post.

Attached Files
products_Update.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the element next to the file field is a hidden element, meaning that you wont see it in the browser widow. hidden elements cannot be seen on the page.


the way the update works is this:

the hidden element should contain the name off the file stored in the database.

in the update behavior, you have the ProductImage column bound to the Digital File pro Server File name variable.

If no image is uploaded, the server file name variable uses the Default File value (The value originally stored in the ProductImage column)

if a new image is uploaded, the server file variable is set to the name of the newly uploaded image.

Sign in to reply to this post

bill3786

Ok, I understand your expanation.

Is there way to display the currently stored image file name on the update page. The note below from the "Adding DFP to DataAssist Insert & Update Pages" suggested to me that it would be displayed.

4.
Change <input type=”text”> to <input type=”hidden”>.
Note: This is done to allow us to display the value for the form field that is currently entered into the database.

I would find it useful to see the stored image name before deciding if a new image was required.

Sign in to reply to this post

Jason ByrnesWebAssist

add the following code next to it to show the current file name:

php:
<?php echo(str_replace('"''&quot;'$row_WADAproducts['ProductImage'])); ?>
Sign in to reply to this post

bill3786

Many thanks, got it working fine now.

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