PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Bug Reports (http://www.photopost.com/forum/classifieds-bug-reports/)
-   -   Statistic shows wrong value of sold ads (http://www.photopost.com/forum/classifieds-bug-reports/140951-statistic-shows-wrong-value-sold-ads.html)

wolven October 16th, 2009 04:16 AM

Statistic shows wrong value of sold ads
 
1 Attachment(s)
Hi Chuck,

I've experienced a weird error. The statistic shows a ridiculous high value for sold ads.
What could happend? And how can the statistic set back (or can be new build)

Thanks and regards,

Knut

Chuck S October 16th, 2009 04:34 AM

I will look at the code to see if I see anything but yes thats a weird error.

KenDude October 16th, 2009 09:54 PM

Chuck,
Remember I had something like this occur where the dollar value was ridiculously high. Obviously I could go into the database and try to track down that table and value and change it manually, but might be nice to have that option in the admin panel as well. :)

Thanks!

Chuck S October 17th, 2009 06:40 AM

Yes one can always manually do it. we can always look at options when in a beta.

wolven October 17th, 2009 09:15 AM

I could change it in the stats table, but it doesn't explain the occurence of the error. I'll just wait on Chuck's findings.

Regards, Knut

Chuck S October 17th, 2009 04:02 PM

I am not seeing anything strange in the code

I mean the code to update the stats only happens in 3 places. 2 to add and 1 to subtract

In sendnotice when winning auctions are done stats are added to

In editproduct when an ad is sold the amount is added and when you hit resell the amount id subtracted

Thats it.

wolven October 17th, 2009 06:06 PM

It' s even stranger. It seems that no sold ads are added to the stats anymore. The value stands still at this huge point. I must verify that...

Regards, Knut

EDIT: I set it back to a reasonable value from backup. The only thing I could verify was, it happend suddently.

Chuck S October 17th, 2009 06:57 PM

well the stats table has a maximum int value of 12 characters which is like

999,999,999

So unless someone entered some ridiculous price I cant see anything weird happening unless your mysql has some issue. All we do is a simple query to set the amt_sold to that amount plus that price of the ad

Code:

Content visible to verified customers only.

wolven October 19th, 2009 06:58 AM

After I reset it to a reasonable value, I found it today again at 7 million something. I scanned all ads and can't find any high price in it.

I wonder if XCache could make something wrong?
Or someone is making "fun" but for that I must understand, when the price is add to the statistics. Would it even be possible for users to manipulate the price of a sold ad?

Regards, Knut

Chuck S October 19th, 2009 08:08 AM

If users can edit an ad sure they can redo the price sure

I cant say about XCACHE never used it personally. I guess you could try disabling it to see if the behavior continues.

Like stated I dont see any issues particularly with the code since all that happens here is if an item is sold me update the stats to be stat amount plus price etc. its a pretty cut and dry simple query.

wolven October 19th, 2009 05:28 PM

Now I exchanged one prob by another.

In order to check whether someone hoaxes me, I disabled Editing Ads by users.
But now noone can mark the ads as sold anymore.
I get an "You have no permission" and the backlink leads to Nirvana.
This is not really understandable (besides it's the same php to realize those features). Marking sold is not as invasive as editing.

Any hints?

Thanks!

Regards, Knut

Chuck S October 19th, 2009 08:23 PM

well not allowing users to edit anything with the ad the issue is that they dont have permission. I can see in the future how to separate those types of permissions.

wolven October 22nd, 2009 10:02 AM

Chuck, I build my own solution by change the input field in editproduct to hidden. Users are now allowed to edit, but can't change the price (that easy).

Regards, Knut

Chuck S October 22nd, 2009 11:21 AM

Not a problem so your solution is users are playing with you it seems

wolven October 22nd, 2009 11:34 AM

Thats what I suppose, I have no other explaination.
Thank you for your instant help here.

I'm not sure whether I found a bug or not.
The option "Allow users to move/delete their own images" in Admin Options show in editproduct a checkbox for delete as last line. When I check this the whole ad is gone. Is that the supposed behaviour?
A change in Admin Options to "no" makes this line disappear and the ad is not deleteable by users anymore (what I really prefer!)
The question is: Do we have a misleading phrase (maybe from photopost gallery) or did I misinterpret that? Or do we have a litte bug in there?

Regards, Knut

Chuck S October 22nd, 2009 11:44 AM

Of course it is the intended behavior it is the delete box as it says. what yours does not say delete?

This is right in the template

Code:

Content visible to verified customers only.
Now if I look up the phrase it says the same thing it says on my site

Code:

Content visible to verified customers only.
Quote:

If you want to <b>delete</b> this ad completely, check this box

wolven October 22nd, 2009 11:52 AM

Ok, understood

But am I right, that this checkbox is direct related to "Allow Users to delete their own images in Admin options? If so, than it's at least misleading.
But no problem, when known what it stands for.

Thanks again Chuck.

Chuck S October 22nd, 2009 12:46 PM

Yes allow users to move delete images is the option

I dont in any way see how thats misleading its pretty straight forward. If you allow users to move or delete there stuff they can do just that.

benFF October 23rd, 2009 12:40 AM

It should read "Allow users to delete their own Adverts" ;)

Chuck S October 23rd, 2009 06:43 AM

Is that really english? ;)

Ben your talking about the admin option and if I changed that word it would be ads not adverts. I do not know anyone who used that word. It is should for advertisments I know.

My comment is based on the actual wording the user sees. Wolven thought it was misleading in someway that his ads would actually be deleted if he hit that checkbox yet the wording is quite clear there.

Quote:

If you want to delete this ad completely, check this box


All times are GMT -5. The time now is 03:06 AM.

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97