My drupal cron job was failing repeatedly with the error "Cron run exceeded the time limit and was aborted." Upon investigation, there was a clue in the PHP error log that a function was not found when doing an eval in common.inc. I tracked the problem down by turning off modules one by one, and isolated it to notify. I upgraded notify to the newest dev version, but the cron still bombed. I then grep-ed my drupal db backup and found the offending bad PHP code in a page snippet.

I think it doesn't make sense for notify to eval nodes which are PHP scripts. Not only can it result in a scenario where it takes down the whole cron job for a piece of bad code, it also doesn't scale well for a large number of email subscriptions.

Thanks for all that you do and your consideration of this problem.

Comments

deekayen’s picture

Status: Active » Postponed (maintainer needs more info)

I think for this bug to proceed anywhere, there needs to be an error message and an example of the code that made notify kill cron. There is no specific eval statement in the notify source.

gpk’s picture

The problem is that _notify_content() calls check_markup(), which runs all relevant filters on the node body or teaser.

Therefore if any node using the PHP input format contains invalid PHP then this error will occur.

_notify_content() is called by _notify_send() which is called by notify_cron(). See http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/notify/noti....

Other modules suffer from this type of problem also.

gisle’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Duplicate of #146521: breaks with php code - nodes.

As noted by gpk in #2, it not a bug.

For more anout this, see the section "Warning" in the Community Documentation.