Closed instantflorian closed 4 years ago
Solution:
require_once __DIR__.'/info.php'; foreach($block as $k=>$v){ if ($k == 99) {continue;} ob_start(); page_content($k); $contentblock[$k] = ob_get_clean(); }
or similiar content fetching code has to be placed AFTER
register_frontend_modfiles('css'); register_frontend_modfiles('jquery'); register_frontend_modfiles('js');
If the output of a template is buffered with
... ob_start(); page_content($k); $contentblock[$k] = ob_get_clean(); ...
and in the template that code is placed before theregister_frontend_modfiles()
calls, in the generated frontend page the links to the frontend.js files are placed before the jquery files, which leads to JS errors and non-working modules which depend on jQuery. E.g. instead of ``
the code is generated like `
Strange: cookie consent's frontend.js seems not to be affected (o_O)