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.
Revealed via #1287368: Drupal.settings.ajaxPageState.css gets overwritten
+++ b/core/modules/simpletest/tests/ajax.test
@@ -127,6 +127,18 @@ class AJAXFrameworkTestCase extends AJAXTestCase {
+ // @todo D8: Add a drupal_css_defaults() helper function.
+ $expected_css_html = drupal_get_css(array($expected['css'] => array(
+ 'type' => 'file',
+ 'group' => CSS_DEFAULT,
+ 'weight' => 0,
+ 'every_page' => FALSE,
+ 'media' => 'all',
+ 'preprocess' => TRUE,
+ 'data' => $expected['css'],
+ 'browsers' => array('IE' => TRUE, '!IE' => TRUE),
+ )), TRUE);
+ $expected_js_html = drupal_get_js('header', array($expected['js'] => drupal_js_defaults($expected['js'])), TRUE);
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-css-defaults-1392874-1.patch | 1.08 KB | petar.gnjidic |
Comments
Comment #1
petar.gnjidic CreditAttribution: petar.gnjidic commentedComment #2
cilefen CreditAttribution: cilefen commented@petar.gnjidic Thank you for patching. I am openly wondering whether we should be adding global scope functions to Drupal. Everything has been moving to classes.
Comment #3
petar.gnjidic CreditAttribution: petar.gnjidic commentedYes, It should be at all...
Comment #15
smustgrave CreditAttribution: smustgrave at Mobomo commentedClosing as outdated.
drupal_js_defaults is deprecated so adding a similar function seems off.
If anyone disagrees please reopen with an updated issue summary.