I am running Drupal 4.5.0 and when Banner is enabled I am getting this error in my log: "Last cron run did not complete."

My site is running cron.php via a wget command from crontab, but the problem is evident when manually calling cron.php too. This is the error that is displayed:

Fatal error: Call to undefined function: _banner_show() in /home/code0/domains/code0range.net/public_html/modules/banner.module on line 1053

This problem was not evident when the site was running 4.4.2.

CommentFileSizeAuthor
#5 banner_0.patch5.96 KBjeremy
#4 banner.patch5.96 KBjeremy
#3 phptemplate-diff.txt1.41 KBgrohk

Comments

jeremy’s picture

Category: bug » support

You are getting this error because you're trying to display an ad when running cron.php. I believe this will not work because cron.php probably doesn't include all modules when running.

What theme are you displaying the banner from? If you'd like help tracking down the problem, please provide a diff (assuming you're using one of the available themes).

jeremy’s picture

Assigned: Unassigned » jeremy
Category: support » bug
Priority: Normal » Critical

In updating the documentation I see the current cvs banner module is not fully ported to 4.5. I have a working version on my devel server that I will upload soon. This should resolve your problem.

grohk’s picture

Assigned: jeremy » Unassigned
Category: bug » support
Priority: Critical » Normal
StatusFileSize
new1.41 KB

Thank for responding Jeremy. Not really sure why that would be happening. To my knowledge, I have no banners being called from my theme which is a hacked version of phptemplate. I used to call a banner from my main.tpl.php file in a table at the bottom of my pages, but that has been removed since the problems began. The only other place I got ads in on the sponsors page.

Now, I have never done a diff, so please bear with me...I am attaching the phptemplate.theme diff from version 1.7. It occurs to me that the problem may be in my main.tpl.php file, should I attach that too?

jeremy’s picture

StatusFileSize
new5.96 KB

Please grab the latest version of the banner.module, it will fix the error you are seeing. I just checked it into CVS a few minutes ago. Or, apply the attached patch.

Note that the INSTALL file has been rewritten, to better explain the installation process.

I have also provided a sample patch for integration with xtemplate. I'm out of time for today, but I'll probably provide a phptemplate patch example soon as well.

jeremy’s picture

Assigned: Unassigned » jeremy
Category: support » bug
Priority: Normal » Critical
StatusFileSize
new5.96 KB

Please grab the latest version of the banner.module, it will fix the error you are seeing. I just checked it into CVS a few minutes ago. Or, apply the attached patch.

Note that the INSTALL file has been rewritten, to better explain the installation process.

I have also provided a sample patch for integration with xtemplate. I'm out of time for today, but I'll probably provide a phptemplate patch example soon as well.

grohk’s picture

I downloaded and installed the new CVS version and it did indeed fix the problem.

Thanks Jeremy!

Anonymous’s picture