Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
3dloco CreditAttribution: 3dloco commentedI 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.
Comment #2
ptoly CreditAttribution: ptoly commentedI 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') {
Comment #3
sreyas CreditAttribution: sreyas commentedHi Ptoly
This was not working when clean url is not enabled. So I changed it a bit
to
Comment #4
Satalink CreditAttribution: Satalink commentedI 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')) {
Comment #5
apadernoI 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.