close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Cleanup Issue

Thread began 5/13/2012 11:59 pm by neo314 | Last modified 5/17/2012 10:13 am by neo314 | 2466 views | 9 replies

neo314

Hi Jason,

I am looking for an answer here, and I think I already described this, but perhaps I did not do a good job, so let me try again.

The working scenario is that the update page is updating a record that already has an image associated with it. The update page uses resize code to display a smaller version above the file field (so the user knows what the current image is). The user inputs a new image to replace the old one. The form is submitted.

The header PHP code:

  • Loads the includes,
  • Creates the recordset for the update transaction,
  • Uploads the image,
  • Executes a conditional statement that determines if a new image has been uploaded to replace the existing one,

    • if true, deletes the thumbnails



  • Executes Update Transaction 1 which updates the image field if a new image has been uploaded,
  • Executes Update Transaction 2 which updates and other changes and redirects to the update page (so presumably none of the pages body code is executed which is where the thumbnail generation code exists)


When the page is redirected, the record is already updated, so it should load the new file name and create thumbnails for the new image, SO WHERE IS THE CODE THAT CAUSES THE OLD FILE'S THUMBNAILS TO BE RECREATED AFTER THEY ARE DELETED?


Now the page is using a framework theme, but I tried removing the framework code and the same thing happened. I have not told it to delete the old full image yet, which I will try shortly, but to avoid throwing errors, it would still be good to understand what is happening here.


The includes for the image resize and framework have remained included throughout, so when I say I removed code, I mean all the active code in the page, not the includes.


I suspect it may have something to do with output buffering from one of the includes, but it still is not completely clear.


In short, the thumbnail code is all below, and the update transaction should redirect the page before the thumbnail code executes. Any light that can be shed on why the resize code is getting executed before the update transaction redirects the page and any fix/workaround for that would be greatly appreciated.

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