 | |  | | | Classifieds How do I...? Wondering how to do something in Classifieds? |
August 11th, 2012, 10:32 AM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 193
| Ads not expiring
Chuck,
Running vB 4.2.0 PL2 and 5.11
Do you recall about a week ago I had an issue with my auctions not renewing the correct days and you told me to replace this code? http://www.photopost.com/forum/1301831-post14.html
Now I am having problems with regular ads not expiring. I have a regular for sale ad that was to expire at 8:39 pm last night and it did not. This is the second time since the code change you had me do from the above link I posted that the ad didn't expire. My cron is set to run every 15 minutes.
Any suggestions?
WD
|
| |
August 11th, 2012, 02:55 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,702
|
Well are you running the cron script a regular ad will expire if its enddate is less than the time right now. Look right in the cron or sendnotice php file Code: Content visible to verified customers only.
What that query says is lets break it apart. It says set status equals right now and approved=4 where enddate is less than right now and is auction is no and the ad is already not expired meaning status is 0
That query has the same forever in the program. It works fine.
Your ad if it will not expire means one of three things.
1. It is not an ad but an auction.
2. It is already expired meaning status is not 0
3. Its enddate is greater than right now
That is the only way an ad would not be expired.
|
| |
August 11th, 2012, 04:03 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 193
|
I follow you Chuck, I checked the DB and the isauction is "0" and the status is "0" and the end date is 1344649152
This member did enter a buy it now price for some reason. Could this cause the problem?
WD
|
| |
August 11th, 2012, 04:29 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,702
|
I can not say without more info here. I did a quick test by setting the enddate of this product in my test site database to your enddate above. I ran sendnotice.php and it was expired. test 3 - PhotoPost Classifieds
If I go under product options it says RELIST IT which clearly tells me it is expired and I checked the database and the status was set to the time the cron script was ran and approved is now 4.
There does not appear to be any issues there.
|
| |
August 11th, 2012, 05:08 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 193
|
Okay Chuck, looks like my cron is not working or something. I manually ran the script classified/sendnotice.php in my browser.
This removed the ad for viewing but still shows in the total number of ads. When looking in DB it shows end date now of 1344721687 and approved "4"
I looked in admincp/expired queue and nothing is there. I haven't tried to run anything in admincp/scan DB to see if that would clean up things. I wouldn't think I should have to manually have to do this all the time.
I attached a pic of my cron settings in admincp.
If you tell me what you need to know, I'll put it together and post it here or send you login info to look around.
WD
|
| |
August 11th, 2012, 05:15 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,702
|
If your using the footer cron that is ONLY going to run once a day if that is how you have it set.
If your electing to run your footer cron once a day which is 86399 or so then if it ran before last night at 840pm or so then that totally explains why the ad is not expired yet. It means you have no issue.
It simply means the ad would have expired today sometime when ever your cron ran.
Make sense now. I pretty well figured that was your issue.
Your cron.php script is only going to run if the lastupdate field in your stats table is greater than the difference you place in number of seconds for that task to run. If it is less nothing happens.
|
| |
August 11th, 2012, 05:24 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 193
|
In the attach pic I have my setting set at yes/yes and 900/900. Is this wrong? How should I answer those 4 questions?
WD
|
| |
August 11th, 2012, 05:30 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,702
|
Well first it seems you have ran an upgrade multiple times if you see multiple phrases you can run the phrases.php script to fix that.
Your cron.php script should work the latest classifieds script has the latest files and the cron script is the same as the sendnotice script except one does not include pp-inc.php as sendnotice is a standalone script.
|
| |
August 11th, 2012, 05:37 PM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 193
|
I just ran phrases.php and it only shows import language phrases. If I click on that will it remove the double phrases?
|
| |
August 11th, 2012, 05:44 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,702
|
Yes it will you have double phrases as you ran upgrade twice.
|
| |
August 11th, 2012, 06:02 PM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 193
|
I got this error, what do I do. Code: Content visible to verified customers only.
|
| |
August 11th, 2012, 06:08 PM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,702
|
That is not an error that is simply telling you that you have an english language entry already. No big deal do nothing.
|
| |
August 11th, 2012, 06:14 PM
|
#13 (permalink)
| | Member Verified Customer
Join Date: Jan 2008
Posts: 193
|
So I take it I don't need to click the upgrade link then?
Can I leave the Cron Script -Run cron task to expire ads in footer of site versus setting up a cron task on server? every 900 secs [15 mins] or should this be set at 86399?
This confuses me because of auctions, I thought the cron should run like every 10-15 for auctions instead of one day.
WD
|
| |
August 11th, 2012, 06:59 PM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,702
|
You can run your cron script anyway you wish. I am merely saying the cron script and the sendnotice scripts are identical scripts except for the require line for pp-inc.php
You can download 5.11 if your not using the latest any changes I noted before are definately included there in case maybe you did not edit something correctly.
The query we are now discussing has never changed in all the years that classifieds has existed and does appear to work just fine as all that does is issue a query to expire ads where an enddate is less than a given unixtimestamp value.
|
| | |
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 12:48 PM. | |