It is not supposed to work that way. Combining the files removes a module tag from the script definition and that causes problems. You will have to exclude Photonic’s scripts from the combination.
Thread Starter
babor
(@babor)
I tried it, but doesn’t help.
You are not providing a URL, so I cannot say for sure. However, there are two files that you will need to exclude.
Thread Starter
babor
(@babor)
https://tinyurl.com/f3kbj3rj
Now the Combine JS files switched off.
-
This reply was modified 5 years, 1 month ago by
babor.
I am seeing your page fine. What issue are you facing?
Thread Starter
babor
(@babor)
At the moment not active the Combine JS files.
If I activated the Combine JS files, I see this: https://ibb.co/NC0KpRt
As I wrote in my first post, you cannot combine the files using a separate plugin – if you combine them, that other plugin will remove a type='module' flag from the Photonic script declaration. That causes errors on your site: first, it will cause JavaScript modules to be improperly included, and second, it will cause Photonic’s functions to be declared twice. Basically your caching plugin should be able to support standard JS features, type='module' and nomodule definitions properly, otherwise it will break any other plugin that uses these features.
The only way to avoid this is to exclude Photonic’s files from being combined, but to combine every other (non-Photonic) file. If your caching plugin cannot exclude specific Photonic’s files and you still want to use the caching, then the other alternative may be to use old JavaScript code by setting Photonic → Settings → Generic Options → Advanced → JavaScript Version to “Include only transpiled code”. This might help, but there are no guarantees.
Otherwise you might want to avoid combining files – this was considered good practice 10 years back, but with the new HTTP/2 protocol, this makes your site slower. You should only do it if you are 100% sure that without combining your site is slower.
Also refer to this post from 2 months back, where I provided an explanation on this topic: https://wordpress.org/support/topic/preload-warning/
Thread Starter
babor
(@babor)
Include only transpiled code not solved the problem.
I solved the problem. If I exclude two files also, it’s works.
This two:
/wp-includes/js/jquery/jquery-migrate.min.js
/wp-includes/js/jquery/jquery.min.js
Thanks for your help.