 | |  | | | Classifieds Bug Reports Post any problems you may be having with Classifieds here. |
August 9th, 2005, 09:12 PM
|
#1 (permalink)
| | Junior Member Verified Customer
Join Date: Jul 2005
Posts: 15
| Cannot upload duplicate image with the same filename(NOT A BUG)
0018.JPG is a duplicate image.
Please upload the image with a different name.
Sometimes it will accept an image with the same filename, usually appending a 1 or a 2 to the end of the filename (e.g. 0018.jpg will become 00181.jpg, if I upload 0018.jpg a third time, it will become 00182.jpg). Other times it will display the error message shown above. Why is it that sometimes this works and sometimes it doesn't? I'm using GD2, though the same thing happened with ImageMagick.
|
| |
August 10th, 2005, 06:52 AM
|
#2 (permalink)
| | Member Verified Customer
Join Date: Apr 2004 Location: Finland
Posts: 94
|
Are you using vb-enhanded mode?
I'm having a problem that is similar to yours but a lot worse- I've been trying to solve this with Michael but after a couple of messages he hasn't replied for a long time....  phpprobid - here I come...
Anyone using vbenhanced Classifieds? What happens when you for example edit a product that has an image - try to upload that same image again (so when you edit you keep that image that is in first slot and add that same imge to the second slot and then save? )
In another words.... (don't try this on production environment unless you are really brave)
1) Upload an ad with one picture.
2) Then... go to edit and modify that ad so that you'll insert on second picture slot that same picture that is being used on first slot (so basically what you are doing is that you are keeping that old picture that is in that first slot and inserting a second picture that is the same as the first/old one - yes, it doesn't make much sense but...)
3) Save
Last edited by Mikan; August 10th, 2005 at 07:12 AM.
|
| |
August 10th, 2005, 08:23 AM
|
#3 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Your not suppose to be able to upload an image with the same name. That is why there is the whole duplication check in classifieds Code: Content visible to verified customers only.
Mikan Private Messaging the Developer is not a function of product support so you will never get help that way. If you have an issue you must contact support@photopost.com or post on the support forums.
Now I dont see where there is an issue with editproduct at all here. Here is how the ad upload process works
1. You upload an ad ( we check on initial upload for an ad posted by you with the same filename. This is to prevent someone posted there ad twice. Sanity check for those impatient posters much like a forum double post check
2. You can edit a product and ad other images. Now if you want to add the same picture again 2 more times go for it. Thats your choice. I dont see a problem here.
Last edited by Chuck S; August 10th, 2005 at 08:27 AM.
|
| |
August 10th, 2005, 08:39 AM
|
#4 (permalink)
| | Junior Member Verified Customer
Join Date: Jul 2005
Posts: 15
|
Mikan, I'm using the default, latest install, not vb-enhanced mode.
Omegatron, I did a search on my code, and it is exactly the same as what you posted. Like I said before, it appears to be a random problem. Sometimes it will rename the files appending a 1 or a 2 to the end of the filename and upload just fine, but some of the time it will respond with the error message above.
|
| |
August 10th, 2005, 08:39 AM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Apr 2004 Location: Finland
Posts: 94
| Quote: |
Originally Posted by omegatron Your not suppose to be able to upload an image with the same name. That is why there is the whole duplication check in classifieds. | Except that in my case it doesn't work at all. See PM... (and inside that PM there's that reason why I sent a PM)
|
| |
August 10th, 2005, 08:55 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Well then I would invite you to send a url login for me to test
|
| |
August 10th, 2005, 09:12 AM
|
#7 (permalink)
| | Junior Member Verified Customer
Join Date: Jul 2005
Posts: 15
|
Omegatron, sent you a PM with the url.
|
| |
August 10th, 2005, 09:48 AM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Sig
Your issue is as I posted you cant upload a duplicate image on install it will die for the reasons I stated and should die and is coded this way. It is the same philosophy as a duplicate post in a forum
|
| |
August 10th, 2005, 11:21 AM
|
#9 (permalink)
| | Junior Member Verified Customer
Join Date: Jul 2005
Posts: 15
|
So, what you're saying is that as long as the users are different or a certain amount of time has elapsed, even if someone is posting something with the same name, that will work? Just not the same user posting the same thing over and over?
That makes sense, if so. As I'm testing, I'm using the same couple of usernames, so I can see the point to eliminate duplicate postings. I actually noticed that posting comments did the same thing if I tried to post the same thing twice.
So that I am clear on how this works, let's say that three different users attempt to post images that are named "for_sale.jpg", all three of these should post with PhotoPost renaming the second one "for_sale1.jpg" and the third one would be renamed "for_sale2.jpg"? Is this correct? And if the same user were to attempt this same scenario, they would receive the error message that I have posted above?
|
| |
August 10th, 2005, 12:16 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Yes different users can post images with the same name and they should be renamed as you state.
However you can not upload an image with the same name if you have already done so.
You got it |
| |
August 11th, 2005, 02:36 AM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Apr 2004 Location: Finland
Posts: 94
|
Hmm.. any ideas why that check doesn't work at all in my case?
So in other words if a user uploads same picture (haven't tested this but I suspect (drawing conclusions from filenames and datestamps) that it can happen also when a user renews his ad) it'll get renamed with "1" but then happens what you already know. This problem started to occur starting from v2.40 / v2.41
|
| |
August 11th, 2005, 08:50 AM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
No the check works everytime as I have explained it. If the filename and userid is the same.
Speaking with the other user he was using multiple accounts testing so in that respect it follows the normal image rename convention.
If you try uploading the same image with the same user it will fail as it should.
|
| |
August 14th, 2005, 03:37 PM
|
#13 (permalink)
| | Member Verified Customer
Join Date: Apr 2004 Location: Finland
Posts: 94
| Quote: |
Originally Posted by omegatron No the check works everytime as I have explained it. | Hmm... I have told you several times it doesn't work for me.
Can you take a good look at in your own code and think what could cause the problem that I'm having. You already know what happens in my case and how to make that problem happen. What your code does when you follow those steps and how is it possible that it's doing what it's doing? Because that fact is.. it does what I have told you and it's your code that's doing it.
Last edited by Mikan; August 14th, 2005 at 03:53 PM.
|
| |
August 14th, 2005, 03:53 PM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Right you say but this is something we can not reproduce using the default latest code on several different installs.
You have refused all attempts that we have asked several times for access to your install to assist and test so given this there is nothing more I can say on this issue.
I have explained exactly how things work and that second and third images can be the same image only the first image is checked.
Basically if you want support on this issue you will need to be running unmodified files and we will need ftp and admin access. If we can not reproduce any errors then obviously we need to look directly at whats so special about yours.
|
| |
August 15th, 2005, 01:38 AM
|
#15 (permalink)
| | Member Verified Customer
Join Date: Apr 2004 Location: Finland
Posts: 94
| Quote: |
Originally Posted by omegatron You have refused all attempts that we have asked several times for access to your install to assist and test so given this there is nothing more I can say on this issue. | Ok, what would you check ? Instead I can do the same and tell you all the settings - yes, it's a slower method but more suitable because unfortunately I can't give you an admin access to my server. Quote: |
Basically if you want support on this issue you will need to be running unmodified files and we will need ftp and admin access. If we can not reproduce any errors then obviously we need to look directly at whats so special about yours.
| The current install is about 99% unmodified already. The only things that I have modified are two different things that have an effect on layout. There's something in the code I need to ask - more about that on next message.
|
| |
August 15th, 2005, 02:24 AM
|
#16 (permalink)
| | Member Verified Customer
Join Date: Apr 2004 Location: Finland
Posts: 94
|
Background:
uploadproduct.php Code: Content visible to verified customers only.
It says there:
(1) $realname = $_FILES['theimage']['name'][$eximages];
So that's that true file name that is being stored on a server .. so for example 8781mypic.jpg -> that 8781 part is userid and the filename that user has uploaded is mypic.jpg
Then comes this line and this "fixfilenames" function:
(2) $irealname = fixfilenames($realname);
which is:
(3) Code: Content visible to verified customers only.
and after that check & modification comes the query from database:
(4) Code: Content visible to verified customers only.
Now the problem is - that filename that is being stored in database is the filename that the user uploaded - for example mypic.jpg (without that userid part).
Now since (1) is getting that filename from the server that contains userid for example that 8781mypic.jpg
and as far as I can see neither (2) nor (3) removes that userid part how is it possible that query ever works because it's looking for irealname which is in this case 8781mypic.jpg but in the database it's mypic.jpg
Since that returns "0" that imgchk doesn't work.
Is this correct or where do I go wrong here?
|
| |
August 15th, 2005, 05:27 AM
|
#17 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Well its too early and I have not had my coffee to investigate the coding to confirm or deny although that check works for me and everyone else around which is how this thread got started in the first place. If you think its not returning right name you can try this
$irealname = fixfilenames($realname); $irealname = "{$User[userid']}{$realname}";
The issue your reporting above which is very minor and the issue you had PM'd us dont match in the very least as you made some wild claims via PM to Michael and I both that classifieds deletes your forum etc. If you refuse to give ftp, admin access and a url to assist further there is nothing more we can do in a support manner for you.
You need to realize there is certain information we need to provide support. You can comply with this or not.
|
| |
August 15th, 2005, 06:24 AM
|
#18 (permalink)
| | Member Verified Customer
Join Date: Apr 2004 Location: Finland
Posts: 94
|
Well, can you check that I posted above and give a comment if that's a problem and if not where do I go wrong because I think that if this is a bug then it preceeds my problem so it's related and not a minor (I don't think it's appropriate to call a problem that deletes whole VB forum-directory and whole webservice a minor)
|
| |
August 15th, 2005, 07:13 AM
|
#19 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Mikan
I posted a tweak above if you think the code is wrong on the image check. I said that was minor and it is the most minor of things realize if you could repost the same image it would harm nothing as it would simply be renumbered much like if I upload an image with the same name.
There is not and I repeat this again anything in our code that could delete your vb forums. Its quite that simple. You can scan the code back and forth and you will see I am indeed correct.
You repeatedly refuse to give us access/url to assist in seeing this issue so there is nothing more I can say here. You need to understand that if we can not replicate an issue then there is nothing more we can do here without looking at your install.
It's your choice if you want assistance or not and this is by count the fifth time I have asked for a url/admin access and ftp between this thread and the prior PM's.
|
| |
August 15th, 2005, 07:55 AM
|
#20 (permalink)
| | Member Verified Customer
Join Date: Apr 2004 Location: Finland
Posts: 94
| Quote: |
Originally Posted by omegatron There is not and I repeat this again anything in our code that could delete your vb forums. Its quite that simple. You can scan the code back and forth and you will see I am indeed correct. | Well, if I follow those steps that I posted in PM my forum WILL BE DELETED. Things that are involved here are Apache, PHP, Mysql and Classifieds. I don't believe Apache, PHP or Mysql can delete that directory so what's left?
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 02:44 AM. | |