PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Pro Support Forums > Photopost Pro Bug Reports

Photopost Pro Bug Reports Post post installation PhotoPost Pro problems here.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old December 20th, 2006, 06:31 AM   #1 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 218
5.62 Moving images can overwrite existing images

A problem that pops up frequently and is really annoying for our users:

In PP filenames are unique per category. So if you upload an image called foo.jpg to a category which already does contain an image with that filename, it gets renamed to foo1.jpg.

This automatic renaming doesn't exist if you move a file from one category into another. Then, the physical file get's overwritten.

So please check the filenames on moving and rename the moved image if necessary to prevent data loss.
Astaran is offline   Reply With Quote
Old December 20th, 2006, 09:16 AM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 52,666
I dont think Michael has come up with a backward compatible way to do this on moving a photo but I do know we removed the per category check and made it a global check a long time ago. Thus it is people with older systems who might move older photos that would have this issue.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old December 20th, 2006, 09:37 AM   #3 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 218
Maybe a script that scans the complete database and checks for duplicate names would do it? That could be used for "older systems" and no changes to the current code would be necessary.
Astaran is offline   Reply With Quote
Old December 20th, 2006, 09:54 AM   #4 (permalink)
PhotoPost Developer
Verified Customer
 
Join Date: Jan 2002
Posts: 11,736
In 5.62, we look for filenames that match regardless of which category they are in - if an image within the system has the same name, then it gets a new name; which would prevent any overwriting in the future.

There was a bug in a prior 5.5 release that did check explicitly for category names before renaming a file and that was fixed in an update. While uploading, you should not end up with two files with the same name in any category; as for existing duplications, we do not have a mechanism for that.
__________________
Please do not PM me for support or sales questions. Thank you for your understanding.
Michael P is offline   Reply With Quote
Old December 20th, 2006, 09:59 AM   #5 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 218
Ok, I understand that, but we have about 90.000 images that have been uploaded with PP < 5.5 and that might be moved around. So the question is how to address the inconsistent data that has been caused by this bug. That's why I proposed a "cleanup" script to address this issue.
Astaran is offline   Reply With Quote
Old December 20th, 2006, 10:40 AM   #6 (permalink)
PhotoPost Developer
Verified Customer
 
Join Date: Jan 2002
Posts: 11,736
I'll see what I can do. To see if this effects other images, try this query (be sure to use your table prefix):

Code:
Content visible to verified customers only.
Only results with more than 1 are actual duplicates and, also keep in mind that queries are not case sensitive; so its possible to have two filenames that don't overwrite one another on Linux systems.
__________________
Please do not PM me for support or sales questions. Thank you for your understanding.
Michael P is offline   Reply With Quote
Old December 20th, 2006, 10:44 AM   #7 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 218
Thanks, Michael!
Query returned 1,892 total.
Astaran is offline   Reply With Quote
Old December 20th, 2006, 10:53 AM   #8 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 218
Might be helpful for others. This query returns only results with more than 1 duplicate:
Code:
Content visible to verified customers only.
On my installation, this are 873 total
Astaran is offline   Reply With Quote
Old December 20th, 2006, 12:48 PM   #9 (permalink)
PhotoPost Developer
Verified Customer
 
Join Date: Jan 2002
Posts: 11,736
Okay, I've attached a script I wrote and tested in my viperalley.com website which cleaned up about 60 duplicate filenames.

I make no warrenties for this script and it's use; the code seems proper and it worked on my site for the 60 dupes I had. I suggest you check it yourself and backup your photos table before you run it (and even your data directory).

There is error checking built-in - but again, you should review it for yourself and be sure you understand what it is doing before running it.
Attached Files
File Type: zip fixdupes.zip (1.1 KB, 9 views)
__________________
Please do not PM me for support or sales questions. Thank you for your understanding.
Michael P is offline   Reply With Quote
Old December 20th, 2006, 01:06 PM   #10 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 218
Thanks Michael, I'll test it on Saturday and report back to you.
Astaran is offline   Reply With Quote
Old December 24th, 2006, 07:05 PM   #11 (permalink)
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 218
Worked like a charm, thank you!
Astaran is offline   Reply With Quote
Old December 25th, 2006, 12:00 AM   #12 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 52,666
Merry Christmas
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't watermark existing images.. curriertech Photopost Pro Bug Reports 6 September 11th, 2006 12:38 PM
Moving images MotoUp How Do I? - vBulletin 3.5.X 2 April 7th, 2006 09:59 PM
Moving images .... Tobias Honscha Photopost Pro How Do I...? 22 March 22nd, 2006 05:19 PM
Moving Images to Other Categories oldengine vBGallery Suggestions 5 January 17th, 2005 11:31 PM


All times are GMT -5. The time now is 10:23 AM.

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