Testimonial module breaks the cron task.

Symptoms: When running a cron task the site redirects to http://example.com/testimonials

In hook_nodeapi the code uses drupal_goto() which has the side effect of redirecting the cron task. This is a known "feature" and has been documented here http://drupal.org/node/102138.

Temporary fix: comment out the drupal_goto in hook_nodeapi - only suitable if you do not intend to use this page.

Comments

3dloco’s picture

Issue tags: +cron, +drupal go to, +cron exceed time limit, +cron redirects to testimonial, +cron already running, +cron search

I can confirm that I was experiencing the same issue with cron as described above.

What worked for me is actually disabling the module because I can still use the testimonial content type and testimonial view and just modify it as needed. In my case I took off the client link (exclude from display) and took the links off the view.

ptoly’s picture

I had this problem. I did not want to shut off the testimonial module as I'd have to redo the CSS so I stuck in this one line fix:

Change line 46 of the testimonial.module file from

if ($node->type == 'testimonial') {

to

if ($node->type == 'testimonial' && $_SERVER['REQUEST_URI'] != '/admin/reports/status/run-cron') {

sreyas’s picture

Hi Ptoly

This was not working when clean url is not enabled. So I changed it a bit

if ($node->type == 'testimonial') { 

to

if ($node->type == 'testimonial'  && !stripos($_SERVER['REQUEST_URI'],'admin/reports/status/run-cron'))
Satalink’s picture

I used a variation of sreyas as there are several ways that cron can be started. So I choose to eliminate any URI that contains "cron" in the same line 46.

if ($node->type == 'testimonial') {

to

if ($node->type == 'testimonial' && !stripos($_SERVER['REQUEST_URI'],'cron')) {

apaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
Issue tags: -cron, -drupal go to, -cron exceed time limit, -cron redirects to testimonial, -cron already running, -cron search

I am closing this issue, since it is for a Drupal version that now is not supported.
Please re-open it if the issue is also relevant for other project branches that require a supported Drupal version.