After enabling the aggregate and compress CSS files , H5P editor not loaded
Hi ,
I have used the H5P plugin in my drupal site. After enabling the aggregate and compress CSS files , H5P editor not loaded .
I found one error in console " window.js:10 Uncaught ReferenceError: EJS is not defined".
Anyone know the reason ?
How to track the issue in aggregate and compress CSS files ?
In console below is listed: siles/default/files/js/node_modules/global/window.js
if (typeof window !== "undefined") {
module.exports = window;
} else if (typeof global !== "undefined") {
module.exports = global;
} else if (typeof self !== "undefined"){
module.exports = self;
} else {
module.exports = {};
}
icc
Fri, 07/07/2017 - 09:55
Permalink
Have you been using the NPM
Have you been using the NPM command or NodeJS? Do you have a package.json file inside the sites/default/files/js folder? It sounds like you might have another module that causes issues when aggregation is turned on.
maheswarim
Fri, 07/07/2017 - 11:52
Permalink
I don't have package.json
I don't have package.json file inside the sites/default/files/js folder, inside this folder only aggregation js files are there. I included the ejs.js file in our site. May be the ejs files are not aggregated properly . I added the "drupal_add_js("/sites/default/files/ejs.js", array('preprocess' => FALSE));Then only the h5p editor loaded properly. Is this is correct fix?
icc
Fri, 07/07/2017 - 12:31
Permalink
Where is the ejs.js coming
Where is the ejs.js coming from? Neither the H5P Hub or the H5P Editor uses EJS.
maheswarim
Fri, 07/07/2017 - 12:32
Permalink
Ejs.js file located inside
Ejs.js file located inside the folder h5p/libraries/EmbeddedJS-1.0/js/ejs.js
icc
Fri, 07/07/2017 - 12:56
Permalink
That EJS is used for a couple
That EJS is used for a couple of the content types and is not part of the editor. There must be something else on the page including it.
raj.solanki
Fri, 03/24/2023 - 02:39
Permalink
Try clearing cache from chrom
clearing browser cache will resolve the issue. It worked for us, so give it a shot.