Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On line 213 of includes/context-task-handler.inc
, the code decides whether to call drupal_set_title($info['title'])
based on whether $info['title']
is set. However, it should be basing that decision on whether $info['title']
is empty. Presumably, the if check if there to prevent accidentally setting the title if the task has no title specified. But '' (empty string) is considered to be "set" (even though it's falsey), so drupal_set_title()
gets called unintentionally, which destroys all previous uses of drupal_set_title()
.
I've attached a patch which fixes this problem.
Comments
Comment #3
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 4 year old patch to context-task-handler.inc applied cleanly to the latest ctools 7.x-1.x-dev and if still applicable needs review.