dpfaffenbauer / pimcore-minify

Abandond - Pimcore Plugin to Minify CSS and JS
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

minified_javascript is generated but not displayed #1

Closed Cruiser13 closed 9 years ago

Cruiser13 commented 9 years ago

I successfully installed this plugin in Pimcore and it seems to work. I do see a lot of minified_javascript files in my /tmp directory. But the website iteself does not change, it does still have the uncompressed .JS files in the source code.

Am I missing something?

There are no minified_css files in /tmp although there are .CSS files used in the layout.

dpfaffenbauer commented 9 years ago

Can you give me a Link?

Cruiser13 commented 9 years ago

Sadly no, it's on my local development server.

dpfaffenbauer commented 9 years ago

oh ok. the minify only works when disabled the debug mode and your not logged in to pimcore. have you tried that?

Cruiser13 commented 9 years ago

Thanks, deactivating debugging did the trick. You might want to add this to the Readme file.

Now I just have to take a look at jQuery which failes to load minified (ReferenceError: $ is not defined)...

dpfaffenbauer commented 9 years ago

Do you have any inline Javascript? Take a look at the minified JS and check if the order is right.

Cruiser13 commented 9 years ago

Inline JS does exist (while developing). The order is right.

dpfaffenbauer commented 9 years ago

your inline js is the problem. Minify will add the JS to the bottom of the body tag. so, at the time your inline js is called, jquery is not yet loaded.

dpfaffenbauer commented 9 years ago

i finally fixed your problem. all inline js will now minimized and added to the bottom.

Cruiser13 commented 9 years ago

Great job, thanks.