Sterc / modx-minify

9 stars 5 forks source link

I'm receiving a 404 on the stylesheet modxMinify creates... #20

Open robliberty opened 7 years ago

robliberty commented 7 years ago

I'm receiving a 404 on the stylesheet modxMinify creates, it looks like it's not creating the cache folder or the CSS file in the assets/components/modxminify/ directory. Any idea why that would be?

joeke commented 7 years ago

That looks like a permission error as you mention. If you create the assets/components/modxminify/cache folder manually with 777 permissions and try again, does that solve the issue?

robliberty commented 7 years ago

no, creating it manually with permissions set to 777 doesn't work.

I wanted to note that I'm only getting this error when trying to use it on MODX installs that are in a "/newsite" folder structure, ie: www.mywebsite.com/newsite (some of our dev sites use this)

I've got it working great in all other installs (that don't use the /newsite structure)

I love this extra BTW! Auto updating itself on file change is magnificent!

robliberty commented 7 years ago

so... I just found my .css file! The snippet created a full path: newsite/assets/components/modxminify/cache/styles-1_2-1504797350.min.css instead of using the existing structure

any idea on how to fix this?

robliberty commented 5 years ago

This is still happening. If the site lives within a subfolder of another site the generated path of the minified files create their own set of assets/components/modxminify/ folders in the root... but that's not where the site is looking for them, so 404.

terrybarth commented 4 years ago

I seeing this problem as well. I was able to work around this by adding the subfolder to the link in the head like so:

<link href="subfolder/[[!modxMinify?&group=css]]" rel="stylesheet" type="text/css" />

bennyb commented 1 year ago

Had the same issue, that if MODX was installed in a sub dir then it would create the directory within itself. For example if you had modx installed like this. mydomain.com/subdirectory The the cache folder will be created like this mydomain.com/subdirectory/subdirectory/assets/components/modxminify/cache My work around was to set the modxminify system settings like this: modxminify.cache_path = /assets/components/modxminify/cache/

modxminify.cache_url = /subdomain/assets/components/modxminify/cache/