sage icon indicating copy to clipboard operation
sage copied to clipboard

Roots can not find CSS and JS files

Open plekter opened this issue 14 years ago • 76 comments

Hello! I really like Roots and would love to tinker around but Ive gotten a small problem at hands. I have a fresh WP 3.3.2 installation and latest Roots cloned from here but after installation, it does not find the CSS and JS files declared in head.

I am not sure what the issue could be but Im sure Im not the only one. Anyone has any helpful information?

plekter avatar May 01 '12 22:05 plekter

please provide some more information.

retlehs avatar May 01 '12 22:05 retlehs

Here is the site: http://haavistu.eu/roots/

  • A fresh 3.3.2 WP installed through CPanel
  • Latest Roots cloned and uploaded to themes and then installed.

I noticed that when I clicked the Activate button the first time and it took me to theme activation, the CSS and other files paths were working correctly when I checked homepage, but after I did theme activation, it got to what you can see @ http://haavistu.eu/roots/

Some bits about my hosting:

  • Apache 2.2.22
  • PHP 5.3.10

plekter avatar May 02 '12 01:05 plekter

what does your .htaccess file look like? have you flushed your permalinks?

retlehs avatar May 02 '12 03:05 retlehs

Hello Ben.

My htaccess file under the /roots/ is the following:

BEGIN WordPress

RewriteEngine On RewriteBase /roots/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /roots/index.php [L]

END WordPress

I havent done anything to flush the permalinks, I am in a hurry right now but will go over it once I get back(no clue right now how to do it). If you have a pointers to some good material I am all ears. :)

plekter avatar May 02 '12 09:05 plekter

same issue here. flushed permalinks to no avail. .htaccess in the root wp install shows boilerplate modifications and css rewrites.

ghost avatar May 02 '12 16:05 ghost

This sounds like the exact same issue I wrote about in my issue thread but for a different reason. https://github.com/retlehs/roots/issues/425

asuh avatar May 02 '12 19:05 asuh

i finished the activation page, though. something seems related to url rewrites.

ghost avatar May 02 '12 21:05 ghost

I have the same issue - fresh install of wordpress and roots 5.1 and it can't find my css or js files.

gdub01 avatar May 02 '12 23:05 gdub01

Hey Ben,

Love the roots theme.... but have noticed the same issue as the people above.. i am at a loss as to why this is happening.. ive been working on my localhost and also live on a hg hosting account.. and am getting the same issue..

If i activate the theme via the wordpress admin.. without using the "Roots Theme Activation" / clicking the "Roots Theme Activation" save button my styling & scripts load fine... it's once clicking the save button under "Roots Theme Activation" that the styling and scripts no longer load...

Activating the theme via the wp admin panel WITHOUT clicking the save button under the "Roots Theme Activation" options page.. the style and scripts load fine.. but if i go to change the permalinks to anything other than default "http://localhost/wordpress/?p=123" the styling and scripts no longer load / work....

Ive also noticed that when clicking the "HOME" button in my roots top menu it links to when "http://localhost/" when my wordpress install is installed here: "http://localhost/wordpress/"

Hope this information helps fix this ASAP, in the mean time i will keep searching the the roots files trying to fix this issue / provide more information on this.

Regards, Darren

expertpixels avatar May 04 '12 04:05 expertpixels

Don't know if this is related, but I had the same problems, this is how I fixed it.

  1. Check that your .htaccess file have write access.
  2. My .htaccess started with the BEGIN WORDPRESS... and after some lines of code, came the HTML5 BOILERPLATE stuff, switch em, so the HTML5 BOILERPLATE comes first.
  3. I know this is stupid, but clear you cache and refresh your browser.

hixen avatar May 04 '12 20:05 hixen

Hi Hixen,

Ive tried all the above as you have mentioned and have not had any luck, ive tried several different .htaccess edits and still nothing is doing the trick.. really frustrating as i am trying to get my up and live today / over the weekend.. i mean ive got stuff i can still work on, but am just hoping that all the work on the css / template files has not got gone to waste.

(Hixen if you get a chance can you upload a copy of your .htaccess file to pastebin or something so i can compare any differences, CHEERS).

Will keep a close eye on this topic and hopefully we can get to the bottom of this.

Regards, Darren

expertpixels avatar May 04 '12 22:05 expertpixels

  1. Try and activate another theme, and then reactive your roots theme.

Silly question, but are your re-writes working at all?

Here is my .htaccess http://pastebin.com/Kg9Musvb

hixen avatar May 04 '12 23:05 hixen

Cheers for your quick response Hixen :)

Really trying to get this sorted asap.. Testing your .htaccess file now (really appreciate that).. And yes ive tried activating other themes etc..

ok i replace my .htaccess file with your one and the same issues is occurring.. the stylesheets are simply not being picked up when using any other permalink setting besides the default one.

My theme with default / ugly permalinks: http://i48.tinypic.com/6qy1vl.png

My theme with default / ugly permalinks: http://i45.tinypic.com/10fym8k.png

Really at a lose here to understand whats going on... Will be online for the next 12 hours or so and will keep looking into this.

Thanks again for any help on this matter.

Regards, Darren

EDIT: yes my re-writes are working: http://localhost/wordpress/news/news-3/ <--- with updated permalinks, just no styling is applied at all.

expertpixels avatar May 05 '12 00:05 expertpixels

It's your rewrite that is not turned on or is not working. (i think)

What setup do you have?

I should be in bed sleeping, but my 1 year old daughter have been screaming for the last 6 hours!

Skickat från min iPhone

5 maj 2012 kl. 02:22 skrev expertpixels [email protected]:

Cheers for your quick response Hixen :)

Really trying to get this sorted asap.. Testing your .htaccess file now (really appreciate that).. And yes ive tried activating other themes etc..

ok i replace my .htaccess file with your one and the same issues is occurring.. the stylesheets are simply not being picked up when using any other permalink setting besides the default one.

My theme with default / ugly permalinks: http://i48.tinypic.com/6qy1vl.png

My theme with default / ugly permalinks: http://i45.tinypic.com/10fym8k.png

Really at a lose here to understand whats going on... Will be online for the next 12 hours or so and will keep looking into this.

Thanks again for any help on this matter.

Regards, Darren


Reply to this email directly or view it on GitHub: https://github.com/retlehs/roots/issues/426#issuecomment-5522896

hixen avatar May 05 '12 00:05 hixen

Get some sleep Hixen, i'll keep trying to sort this out..

On my localhost & live hostgator server my re-writes seem to be working fine.. all my links with different permalink settings are working fine, just no styling applied.

Running Xampp on windows 7.. ive added the re-write module / enabled rewrite_module

Cheers again

expertpixels avatar May 05 '12 00:05 expertpixels

OK !!! ive managed a temporary fix to this...

I copied all folders from the roots theme into my installation directory: localhost/wordpress/ <--- copied the roots following folders here: css, img, js, lang, inc and now my site is working with permalinks and is displaying my stylesheets...

Now i am still none the wiser as to why ive had to do this.. from what i can tell my re-writes are working as permalinks for all other themes are running fine...

Hope this info helps to identify whatever is going on.

Regards, Darren

expertpixels avatar May 05 '12 01:05 expertpixels

I just did a fresh install — WP 3.3.2 and the latest Roots 5.1, and am having the same problem — css and js are not found.

My .htaccess file is the default:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

ghost avatar May 05 '12 18:05 ghost

moved to issue #395

gsonbuchner avatar May 07 '12 03:05 gsonbuchner

Also due to this path issue ive noticed that when adding a new theme options page that some further issues are occurring: Warning: Cannot modify header information - headers already sent by

Also ive noticed that there are problems uploading attachments when trying to add a image to a posts / setting a featured image.

Lets try and get on top of this issues ASAP, I really love the roots theme and would love to get my project live asap, i am just unsure how much work to put into further development in case these issues are not fixed / no one can find a fix for this.

It's definitely a issue relating to the path.. even setting a "Home" page does not work.. I wish i could be of further assistance to the roots community but this problem has me stumped atm.

Regards, Darren

expertpixels avatar May 07 '12 10:05 expertpixels

Check your settings > media

Or try and enable another theme and back.

Skickat från min iPhone

8 maj 2012 kl. 14:07 skrev rabhw [email protected]:

Just chiming in to say I've got a similar issue. My permalinks are working fine, but my uploads folder /assets/ is still trying to load assets from localhost, even though I've migrated my site from my local server to a staging server. I've obviously update the home / siteurl in the wp_options table. My permalinks are fully working, it's just the /assets/ folder that seems to still be getting directed to localhost.


Reply to this email directly or view it on GitHub: https://github.com/retlehs/roots/issues/426#issuecomment-5573081

hixen avatar May 08 '12 12:05 hixen