Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
robliberty opened this issue Sep 11, 2017 · 6 comments
Open

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

robliberty opened this issue Sep 11, 2017 · 6 comments

Comments

@robliberty
Copy link

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
Copy link
Collaborator

joeke commented Sep 11, 2017

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link

terrybarth commented Feb 25, 2020

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
Copy link

bennyb commented Apr 21, 2023

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants