Since upgrading to 6.x-2.0-alpha4, the "Reset Ad Expiration" checkbox is no longer functional. I check it and save the ad, but the date is not reset to another 8 days (my setting for the length of the ad). It still expires on the original expire date. (See image for the button I'm talking about).
I don't know if something here is causing the problem, but maybe it's in the ed_classifieds.module file around line 610?
// calc expiration date as appropriate
// If new ad, or user wants to reset expiration, or taxonomy was changed... recalc expiration?
if (empty($node->expires_on) || $user_reset) {
// it's a new ad, or the user chose to reset the expiration
$form_state['values']['expires_on'] = $expiration; // _ed_classified_get_default_ad_duration_in_seconds();
// _edi_wd(sprintf('Ad expiration was %d (%s), now %d (%s)', $old_expires, _edi_safe_date_fmt($old_expires), $node->expires_on, _edi_safe_date_fmt($node->expires_on)));
// TODO: need to deal with republishing if workflow allows
$expiration_changed = TRUE;
}
| Comment | File | Size | Author |
|---|---|---|---|
| Reset Ad Expiration.png | 14.04 KB | geerlingguy |
Comments
Comment #1
milesgillham commentedYou are right. I had been cleaning up the D5 -> D6 form usage and the problem was that the form was not picking up that a reset was required. The error was on line 602 and should read:
I will roll this into -dev and issue alpha5 release as this is nasty.
Cheers,
Miles
Comment #2
geerlingguy commentedAwesome! You have been doing an awesome job on this module, btw, and I'm so glad someone was able to take up it's banner—it's one of those modules that makes Drupal so amazingly awesome as a framework.