Closed (fixed)
Project:
Classified Ads
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Jan 2009 at 20:12 UTC
Updated:
22 Jul 2009 at 23:00 UTC
A hit on cron kills a site with ads needing expiration notifications sent. Here's the error:
Fatal error: Call to undefined function _ed_classified_notify_user_of_ad_expiration() in /var/www/drupalsites/drupal-6.9_arctest.eapdd.com/sites/all/modules/ed_classified/ed_classified_utils.inc on line 194
I'm not sure what other function that should be pointing at since I can't find one that accepts a $node argument. Any ideas?
Comments
Comment #1
barckhoff commentedHi tomws,
It appears that the notifications part is still under construction. I tried changing the call to that missing function @line 203 in ed_classified_utils.inc from
_ed_classified_notify_user_of_ad_expiration($node);
to
_ed_classified_process_notification_emails($time);
Which *sort of* gets it to work, but there are issues with retrieving the recipient's emails and the from email formatting doesn't work (can be easily remedied by getting rid of the string for "Reply to:" etc.).
For the time being, until someone smarter than me can correct the notification functions, I've just commented out the line above to bypass the notification functions so that the cron will run.
Comment #2
tomws commentedI did the same thing to mine and just posted a note to the users that they won't get the expiration reminders.
Comment #3
mcurry commentedThe cron job email problem is odd, and I've never heard anyone report it until now.
This module is not ready for use on a production site (I've never released an official 6.x build). This module is currently 'test only' for Drupal 6. Sorry.
I'll investigate this when I can but as you can see, I'm seeking a new maintainer due to my inability to maintain this module.
Comment #4
tomws commentedNo complaints. I'm choosing to use a dev version because I need the functionality. Stuff happens. Users will live with it until a full version is ready.
Comment #5
milesgillham commentedI think I have a fix. I've added the missing function to ed_classified_notifications.inc
To do that I had to add an additional e-mail notification function telling the user that their ad has expired, as opposed to about to expire. So furthere down in that same file there is now:
And for that to work, I added the following to ed_classified.module:
I'll play around with it and test it out and see if I'm on the right track. I'll offer a patch if it's stable.
It's an extension of what is their, but I think down the track I'd rather genericise the email notification with parameters for subject/body. There's a number of todos in that file that probably need a closer look also.
Cheers,
Miles
---
Comment #6
milesgillham commentedCode changes applied to 6.x development branch.
Comment #7
tomws commentedThanks for your work! I hope to play around with this in the next few weeks.
Comment #8
milesgillham commentedNo problems. That should since have been swept up in alpha3 release and alpha4 should be out within the next week.
Regards,
Miles