Extension, Plugin

Developer
Supported

EE 1
EE 2
Minimee

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

     

You must be logged in to post.

[Resolved] Can you clarify “Cache Path” - I keep getting error: Missing file has been detected

Support Request

JulesWebb
JulesWebb

Hello

I’m having a similar problem as http://devot-ee.com/add-ons/support/minimee/viewthread/769/

I’m using EE2 and Minimee v1.1.2

Is the Cache Path the same as a Server Path? 
My js links work but I’m getting the message:
< !—Minimee: Missing file has been detected: /my/server/path/to /js_file—>

Appreciate the clarification

jules

John D Wells
# 1
Developer
John D Wells

Hi there Jules,

The Cache Path is the absolute path to your cache folder, i.e. where the cached & compressed CSS & JS files will be written.  For most typical EE setups, this and the Cache URL values should be the only settings you ever need to worry about.

I often have my cache folder sitting just above the root of my site, so the values would be something like:

Cache Path: /home/user/johndwells.com/cache
Cache URL: http://johndwells.com/cache

Hopefully that clarifies. Would you mind pasting in the code that is in your template?  The debug message that Minimee is outputting suggests that it cannot find the file you’ve specified.  But if you can verify that indeed it does exist, then something fishy may be going on.

Cheers,
John

John D Wells
# 2
Developer
John D Wells

Jules,

In case I only answered half of your question, let me also clarify what the Base URL and Base Path options are in the Advanced Preferences pane of Minimee…

These two values help Minimee find the *original* CSS and JS files, i.e. the files that Minimee needs to fetch, minify, and combine together before saving into the Cache Path directory.

I’ve made Base URL and Base Path available in case your CSS and/or JS files are not located in an obvious relative location to your main EE index.php file (e.g. http://johndwells.com/index.php is mine).  So for example if you are running EE at a subfolder, say http://juleswebb.com/ee2/, but your CSS & JS files are below that, say http://juleswebb.com/cssandjs/, then you’ll need to specify that in your Base URL and Base Path.

You’d also want to do this if running MSM, but serving all CSS & JS assets from one location.

Again, I hope that helps.  But please do post some sample code if you’re still having trouble getting Minimee to find your CSS & JS files…

Cheers,
John

JulesWebb
# 3
JulesWebb

Hi John

I’m still having trouble figuring it out.  The one thing to note would be that I’m using an above the root install so my public_html and system folders are on the same level.

{exp:minimee:js disable="n" combine="y" minify="y" }    
    
script type="text/javascript" src="/includes/js_jquery-easing">< /script >
    < 
script type="text/javascript" src="/includes/js_jquery-hoverIntent">< /script >
    < 
script type="text/javascript" src="/includes/js_jquery-mousewheel">< /script >
    < 
script type="text/javascript" src="/includes/js_jquery-nivo-slider">< /script 
{/exp:minimee:js} 

Cache Path: /home/user/public_html/cache

Base Path: /home/user/system/expressionengine/templates/default_site
Setting the base path I still get the following error:
< !—Minimee: Missing file has been detected: /home/user/system/expressionengine/templates/default_site/includes/includes/js_jquery-easing—>

John D Wells
# 4
Developer
John D Wells

Hi Jules,

Ah, I think I see what’s going on - are those all templates held in EE, and not flat files on the server?  Because as it is, Minimee will be literally looking for a file named “/home/user/system/expressionengine/templates/default_site/includes/includes/js_jquery-easing”.

Try using the {path=} global instead:

{exp:minimee:js disable="n" combine="y" minify="y" }    
    
script type="text/javascript" src="{path='includes/js_jquery-easing'}">< /script >
    < 
script type="text/javascript" src="{path='includes/js_jquery-hoverIntent'}">< /script >
    < 
script type="text/javascript" src="{path='includes/js_jquery-mousewheel'}">< /script >
    < 
script type="text/javascript" src="{path='includes/js_jquery-nivo-slider'}">< /script 
{/exp:minimee:js} 

Now Minimee knows how best to fetch these files and you should have more success.

Cheers,
John

JulesWebb
# 5
JulesWebb

Ah, I think I see what’s going on - are those all templates held in EE, and not flat files on the server?

Yep, you were right on.  All is working now.

I don’t expect you to have a solution for this, but I thought I’d throw it out there and see what you thougth.
I’m using the code below from http://html5boilerplate.com/
If I don’t include the “fall back” local file then I can include jQuery’s cdn file—after updating the source to include http:
Have you considered adding a conditional perimeter so that the local file would load if the cdn file doesn’t?
Of course jquery needs to be loaded first so I can’t add the “fall back” after the minimee call.

<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
< script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js" >< /script >
< script>window.jQuery || [removed]('
[removed]\x3C/script>')< /script > 

As always, thanks for your help!
jules

John D Wells
# 6
Developer
John D Wells

Hi Jules,

Glad you’re sorted.  Regarding your thoughts about a fallback, it’s certainly an interesting idea.  I’ll chuck it into the back of my mind and see if anything comes out…

Cheers!
John