Open leonstr opened 2 years ago
The request for .../theme/academi/javascript/theme.js is triggered by theme/academi/lib.php:theme_academi_page_init() line 32:
$page->requires->js('/theme/academi/javascript/theme.js');
The request for .../footer is triggered by theme/academi/config.php line 47:
$THEME->javascripts_footer = ['theme'];
Removing this line from theme/academi/config.php stops the duplicate request from occurring and the theme still appears to work as expected.
This change is available in commit 5999035 of my fork.
When loading the home page with the Academi theme selected there are two HTTP requests:
GET lib/javascript.php/1654850719/theme/academi/javascript/theme.js GET theme/javascript.php/academi/1654850739/footer
The content being downloaded for each is identical, a minified version of theme/academi/javascript/theme.js.
Moodle 4.0.1+ (Build: 20220603), academi 2022051700.