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.
Isn't print $scripts;
supposed to go in the section in page.tpl.php?
Drupal has it's own api-mechanism to determine wether individual scripts should end up in $scripts or in $closure i believe, with the expectation that the former are loaded before .