Extension, Plugin

Archived
Forum
(read-only)

Minimee

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From John D. Wells

     

HTML Not Minifying

Support Request

Matt Stein
Matt Stein

Minimee is wonderful, and I’m trying to talk it into minifying the HTML of another site. Everything with JS/CSS is working fine, but Minimee simply refuses to minify any HTML at all.

HTML minification is set to “Yes” in the extension settings, Minimee’s (clever!) template debugging doesn’t mention anything relevant to the HTML, and this is EE 2.4.0.

I have a bajillion other addons with this install, including MSM. Is there an obvious next step to troubleshoot?

John D Wells
# 1
Developer
John D Wells

Hi Matt,

I’m assuming this is with version1 of Minimee - are you willing to try the beta of v2?  It uses EE’s own template debugging system (not so clever as v1, sorry!), and I’ve written Minimee to be far more verbose about what is happening under the hood.  In particular it writes debugging messages for the HTML minification process, which v1 does not do at all.

The beta is, I think, fit for release, I’m just trying to get a few more pioneers willing to test it out!

It’s entirely possible that another add-on is in conflict - if you’re willing to search the third_party folder for the string “template_post_parse”, you’ll see what other extensions are on the same hook.  Perhaps one of those isn’t honouring the last_call…

Being an MSM install, is this happening with every site or just the default?

(Also, I have an MSM add-on that I’m developing in conjunction with the V2 - aptly named MSMinimee - which might be of interest!)

V2 Beta: https://github.com/johndwells/Minimee/tree/version2
MSM Beta: https://github.com/johndwells/MSMinimee

Cheers,
John

Matt Stein
# 2
Matt Stein

This is indeed Minimee 1.1.6, and I’ll happily investigate template_post_parse hooks – then move on to one of the beta versions if I don’t find an offending addon. Thanks for the zippy weekend response and plenty of options!

Matt Stein
# 3
Matt Stein

Hello again, John. I’m using v2 and have found that Structure is the culprit. Adding a last_call check to template_post_parse() in ext.structure.php got the minification working, but with a PHP error in the minified JS. I cleared out Minimee’s cache, refreshed, and all was well.

I also forgot to answer your MSM question: this is happening on the default site, but I’ve not tried using Minimee on the second site yet. I’m going to mention the last_call bit to the Structure guys, and I’ll let you know if I run into any other issues with the shiny new Minimee extension.

davidbehan
# 4
davidbehan

Thanks for this. I thought I was going mad. Couldn’t understand why the html minify wasn’t working. Did more searching based on Matt’s suggestion and found this:

http://structure.tenderapp.com/discussions/suggestions/257-template_post_parse-hook-should-include-final-call

Working for me now. Hopefully structure update their code. Hope it helps somebody else.

Dave