Comments (17)
nice catch, i hadn't tested roots in a subfolder since we added rewrites from /wp-content/themes/roots/css/ (and js/ and img/) to /css/ etc.
looking into it now -- looks like it's in roots-cleanup.php starting at line 28 that must be fixed
from sage.
Thanks for looking into this! I'm having the same issue... I set up a child theme folder for my website so when you update I can pull down your latest stuff without breaking anything. It seems to be causing broken links for me too. Thank you!
from sage.
@swalkinshaw is working on a fix but not sure when he'll get it out (just left for a trip today)
in the meantime you could removes lines 1 through 45 on roots-cleanup.php to get it so you can at least work in a subfolder for now -- basically remove the roots_add_rewrites and roots_clean_assets/plugins functions
from sage.
Thanks! Appreciate it!
from sage.
I also have WP installed in a sub-directory (called /wordpress
) and am having the same problem. I commented out lines 8-45 (line 1 is <?php
and 2-7 are already commented out), but it's looking for css
, js
and img
directories in:
/wp-content/themes/roots/It needs to be:
/wordpress/wp-content/themes/roots/
Any ideas?
Thanks!
from sage.
hmm the rewrite rules might need to be flushed after that -- try going to the permalinks page and clicking 'save' just to make that happen
if you still have the problem then you can take out the root relative filters in roots-cleanup.php
sorry about the troubles in subfolders! will get this fixed asap.
from sage.
i think scott got this working.. will try and push it out to the repo tonight
from sage.
Updated relative path function to work with sub dirs - closed by 40485c7
from sage.
I replaced the roots-cleanup.php
file and it appears to be working correctly.
Thanks!
from sage.
Yep, that's the only file that's been changed. Let me know how it goes. I tested it on a subfolder install but you never know...
from sage.
I replaced the roots-cleanup.php
file and it appears to be working correctly.
Thanks very much!
from sage.
I just installed roots in a subfolder and it does not work. It will however work if I replace roots-cleanup.php with the version from april 04. So... something must have happened between now and april 04. Should I start a new issue about this?
from sage.
i have the latest roots and latest WP installed in a subdirectory
are you sure that maybe your .htaccess file just wasn't generated yet? need some more info besides 'does not work', what's broken.. file paths?
from sage.
Ok, does this help:
WordPress is installed in /wordpress/
The link-tag for the stylesheet looks like this:
link rel="stylesheet" href="/wordpress/css/style.css"
/wordpress/css/style.css gives a file not found/404
If I manually go to
/css/style.css
it will show me the css-file, which makes me think that the htaccess does indeed work.
If i remove
add_filter('template_directory_uri', 'roots_clean_assets');
from roots-cleanup.php it will work (but output old ugly code, of course)
Oh, and I just realized I am using WP 3.2-bleeding and not the latest stable, so maybe that has something to do with it.
from sage.
i just installed wordpress 3.2 nightly and the latest roots into a subdirectory, all paths/redirects working properly
if you're getting 404 when trying to hit /wordpress/css/style.css then it sounds like your .htaccess isn't getting generated or isn't working like it should
from sage.
The .htaccess do get generated. But I'll try it on another server and see if that helps. Hopefully there's something weird going on on this one. Thanks for your time!
from sage.
you mention that you're able to hit /css/style.css but not /wordpress/css/style.css, is it possible that your .htaccess file is in the root and not at /wordpress/.htaccess? also, can you provide us with the .htaccess file that's on your server?
from sage.
Related Issues (20)
- Bug: Sage 10.5 keeps reporting Acorn not available HOT 4
- Bug: Failed to compile CSS/SCSS When curly braces is present on css class as dynamic value for mixin HOT 1
- Bug: tailwind plugins import issue HOT 3
- Method ReflectionParameter::getClass() is deprecated Bug: HOT 1
- Bug: > cache/acorn/framework/cache directory must be present and writable HOT 1
- ❤️ Feature Request: static analysis of blade templates HOT 1
- Sage is incompatible with symbolic links : Unrecognized file extension HOT 1
- Replace single line PHP statements HOT 1
- Sage 9 + Wordpress 6.3 : Notice: Error when decoding a JSON file at path... HOT 3
- Can Sage 10 integrate React and use shadcn/ui? HOT 1
- Hot reload not working (Redirecting to base URL when front page is set) HOT 1
- @import tailwind syntax is not supported and can cause issues with bud cache
- Unable to use @import on css files HOT 1
- Use modern Yarn install
- [sage 9] page-template not working on wordpress 6.4 HOT 1
- Sage 10 tailwind css is not working without small addition to tailwind.config.js HOT 5
- Sage 9 + Wordpress 6.4 and 6.4.1 create broken Gutenberg layout HOT 3
- Admin bar breaking error pages HOT 1
- Seems eslint --fix doesn't apply prettier changes HOT 1
- do_action('get_header') should occur before wp_head() HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sage.