New answers tagged

1

drupal_build_css_cache() is a Drupal 7 function that was removed very early in the Drupal 8 development cycle. The change notices back then weren't very good, so simply searching for that function name won't find anything. (Change notices may be found at https://www.drupal.org/list-changes). The relevant change notice is Pluggable CSS & JS preprocessing (...


-1

https://api.drupal.org/api/drupal/core%21includes%21common.inc/function/_drupal_flush_css_js/8.5.x Try the above. it will clear all caches of JS and CSS. https://api.drupal.org/api/drupal/core%21includes%21common.inc/function/drupal_flush_all_caches/8.5.x It will clear all caches and rebuild.


1

This is because test() is wrapped in an anonymous function, making it not available outside of that function. I would add it to the Drupal object: File 1: (function($, Drupal) { Drupal.myFunction = function() { // Do something. } }(jQuery, Drupal)); File 2: (function($, Drupal) { Drupal.myFunction(); }); Also, as a side note, $(document).ready() ...


Top 50 recent answers are included