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.
Hi,
In the file metatag_views.module, function metatag_views_views_preview_info_alter() there is this code which is wrong:
// Set the page title to be the previewed views title before fetching meta
// tag values.
$title = drupal_set_title();
...
// Restore the page title.
drupal_set_title($title);
I believe this line
$title = drupal_set_title();
should be
$title = drupal_get_title();
Regards,
Comments
Comment #1
DamienMcKennaAfter reviewing the API docs, drupal_set_title() is more suitable than drupal_get_title() as it doesn't perform any additional processing on the string. Thanks for raising the question though!
Comment #2
bohemier CreditAttribution: bohemier commentedHi Damien,
You are right. Sorry, my mistake!
Regards