PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old November 4th, 2008, 03:17 PM   #1 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
[Editimage] Searching Bug confirmation.. and fix

I stumbled into a little bug.. in edit image when replacing an image..
Now it could be my install because i did some modifications in the functions_gallery_imageedit.php.

On the other hand.. the fix is not there.. but in edit_image.php itself.

So if someone could check if he/she has the same bug..
If no.. then its me (and i fixed it) so its ok..
If yes.. then everybody can apply the fix.. thats ok also
-----------
To reproduce the problem:
Go to an image and then in edit image.
There you have the possibility to replace the image.
Replace it!
It works but it seems that the thumbnail is NOT replaced...
(actually it is.. but if you replace it twice its allways the last thumbnail that is created.
So if you replace the first image -> with second image .. I still have thumbnail of first image.
Now if I replace the second image -> with third image .. I now have thumbnail of second image with image of third..
etc.. etc...
-------------
The fix is easy:
in editimage.php
find:
Code:
Content visible to verified customers only.
just invert the order of the 2 lines:
change to:
Code:
Content visible to verified customers only.
it now works correctly with me..

I would only be curious if others have the same problem.. or if its just me

Luc
Luciano is offline   Reply With Quote
Old November 4th, 2008, 06:15 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,687
I will test that out and let you know thanks.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old November 4th, 2008, 10:12 PM   #3 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
thank you sir!
Luciano is offline   Reply With Quote
Old November 5th, 2008, 04:40 AM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,687
Have a good day sir
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old November 5th, 2008, 09:36 AM   #5 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
btw while you are checking.. found something strange... its a half bug...
lets call it a bug that does not cause any errors because it does not affect anything... but... it still is wrong (could be fixed in future version)

the function process_upload is called twice in vbgallery... once in editimage.php and once in upload.php
its called:
function process_upload($thumbcreated = false, $new = true)
note the 2 parameters..
in edit image its called with process_upload(false,false)
and in upload it is called with process_upload(true)

the problem is.. the $thumbcreated = false parameter is a dummy !!!!!!
$thumbcreated is NOT used anywhere in vbgallery!!!

the function should therefore be:
function process_upload($new = true)

the call in upload.php would then be correct with
process_upload(true)

the call in editimage.php would have to be changed to:
process_upload(false)

(of course you can correct it the otherway round.. by changing the call of the function in upload.php from process_upload(true) to: process_upload(false,true) but i think the correct way would be as stated above)

it now works because the call in upload affects only the dummy variable and the new variable is default true.. I think though, it should be changed in a future release...

Luc

Last edited by Luciano; November 5th, 2008 at 09:42 AM.
Luciano is offline   Reply With Quote
Old November 5th, 2008, 09:39 PM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,687
The function is fine as is.

Code:
Content visible to verified customers only.
There are two variables passed in the case of editing a photo because if you replace the photo we need to actually reprocess it. Its just an extra variable whereas in upload.php we only need to pass one variable as its a new photo period.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old November 6th, 2008, 05:15 AM   #7 (permalink)
Registered User
 
Join Date: Aug 2005
Posts: 1,229
Yes i agree.. and i agree also that the function works as is..

but i was just wondering what the $thumbcreated variable was doing there.. as it is NOT used anywhere.. As it is not used.. i thought it would LOOK nicer if it was removed.
that was all!!!
Luc
Luciano is offline   Reply With Quote
Old November 6th, 2008, 05:24 AM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,687
I did not originally write that variable so who knows.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
bug and fix in editimage Luciano Bugs - vBulletin 3.6x 1 March 5th, 2007 11:57 AM
Bug and Fix for "replace image" in editimage Luciano How Do I? - vBulletin 3.6x 0 February 18th, 2007 02:58 PM
How to fix a template bug? Arjan Photopost Pro How Do I...? 7 October 20th, 2006 10:08 AM
5.2 bug, can you still help me fix? Johnny Doomo Photopost Pro Bug Reports 0 September 4th, 2006 04:29 PM
Possible typo/bug in showphoto + fix(NOT A BUG) Sebbb Photopost Pro Bug Reports 1 July 12th, 2005 06:01 PM


All times are GMT -5. The time now is 03:09 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0