2

I am using Minimee 2.1.9 to combine and minify my css and js scripts on my EE 2.6.1 site. All works wonderfully if I don't have Template Caching turned on. When I turn on template caching for a particular template, the page will load the first time, but after that, the minimee tags just return something like this "{f4acc930e16260a7c8fcfd443f232ba1fb6b238e}" instead of the minified/crunched or tag.

My issue seems similar to what's happening with this thread:

Stash, switchee and template caching outputs a random string {6ee64145dfa4ae5926a9c326266d5954499133923}

But I'm not using 'Stash'.

Any idea how I can get around this, so I can use template caching?

Also, my {minimee} tags are within some Low Variables snippets, but I don't think that's related, as I've done a test where I bypassed low variables and got the same issue.

THANKS!

  • After posting here, and realizing I couldn't add a tag for 'minimee', I decided to seek out the Minimee forum on Devot-ee, and I posted there as well: devot-ee.com/add-ons/support/minimee/viewthread/10823 – Gary Reckard Oct 2 '13 at 20:03
  • I believe the word 'random' added to the minimee tag may work. I think its an EE tag to trigger something. – stuartmcd69 Oct 3 '13 at 8:45
  • Hi @stuartmcd69, I've tried adding that keyword to my minimee tags, as just {exp:minimee:display css="head_css" random} or {exp:minimee:display css="head_css" random="random"} to no avail. – Gary Reckard Oct 3 '13 at 15:17
3

(I've given the following answer in the @devot-ee support forums, but am reposting for anyone who comes across it...)

Hi PaleoSun,

The random tag parameter isn’t relevant here, because it’s a slightly different issue to the one that is meant to resolve...

At least in the short-term, there is no real fix other than to disable caching of any template that contains Minimee queue or display tags. It turns out this is pretty much a requirement for the Queue method to work correctly. I’ll try to explain why:

With Queuing, Minimee’s template tags are initially parsed during the normal stages in EE’s parse order. Yet instead of processing and creating the cache, it waits to see if any other queue tags are run, each time saving what it finds in the session. When it encounters the “display” tag, it replaces it with a placeholder string (that “{f4acc930e16260a7c8fcfd443f232ba1fb6b238e}” thing).

Once all template processing is done, by hooking into the “template_post_parse” hook, Minimee then processes all of the tags it found during runtime, compile the results, and then replaces the placeholder string with the final result.

The way EE template caching works, it caches the result of normal tag parsing, but before the template_post_parse hook. That’s why the placeholder string is still there in the template, and why on subsequent runs even though the template_post_parse hook runs, Minimee won’t have any saved tags to process. I hope that makes some sense.

If you were to ever use CE Cache, it has tags that allow you to escape it’s caching, so Minimee can still work very well alongside that, even the queue method (as long as all of Minimee’s tags are escaped).

I will make a note in Minimee’s docs as to the caveat with the Queue method, and I’m sorry for the inconvenience.

Cheers, John

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.