Project:Classified Ads
Version:6.x-2.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I have had the classified ad module working well for about 6 months. Recently I have noticed that newly created ads do not appear in the ad summary page. I tried looking into it and it looks like the date is getting messed up. Here is the top portion of an ad that I just created:

Test Ad

* View
* Edit

* Ad expiration extended from _the beginning of time_ to Thu, 09/28/1989 - 04:08 (already published).
* Classified Ad Test Ad has been created.

Test Ad

expires on Wed, 12/31/1969 - 19:59 (96 years)

This does not make any sense to me. Both the server and client workstation are running ntpd and they have a clockdiff of 0. The server is synced to time1.chu.nrc.ca.

I have reset the settings/ed-classified page to its defaults without success.

Comments

#1

Update:

It looks like it is the same problem as the bottom of this issue (http://drupal.org/node/532712); the content types were unchecked after an upgrade.

The problem could be found here:

Content management > taxonomy > edit vocabulary > select correct content types.

Afterwards, the taxonomy appears in the ads and must be select for each ad that was created while this was a problem. A quick reset expiry date in the ad also help.

#2

Title:Ad expiration dates in past» Ad expiration dates in past

I used to have the same issue with the expiry date: "expires on Wed, 12/31/1969 - 19:59 (96 years)"

Possible fix.

In the ed_classified.module file I changed line 629 from

<?php
$expiration
time() +  _ed_classified_days_to_seconds(_ed_classified_get_longest_duration($terms));
?>

to

<?php
$expiration
time() +  _ed_classified_get_longest_duration($terms);
?>

and it seems to be working fine.

Please try it and confirm.

Thanks

#3

Status:active» needs review

Bug in _ed_classified_get_longest_duration() which returns a duration in seconds if $duration is 0.

Patch fixes this.

Bug does not exist in 6.3, which uses different time functions.

AttachmentSizeStatusTest resultOperations
ads_expiration_in_past-598366-3.patch1.93 KBIdlePASSED: [[SimpleTest]]: [MySQL] 0 pass(es).View details

#4

Version:6.x-2.0-alpha6» 6.x-2.x-dev
Status:needs review» fixed

Committed to 6.x-2.x.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.