Jump to content


Theme / Assets Not Loading

theme css assets javascript loading stylesheet

  • Please log in to reply
12 replies to this topic

#1 Rubans

Rubans

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 15 September 2013 - 04:54 PM

I've just followed the installation guide for newbies here: http://www.grocerycr...gniter-tutorial and got Grocery CRUD installed - functionally at least.

 

But the theme isn't loading correctly (http://rubans.co.uk/main/employees). Viewing source and going to all the asset files (js and css) none of them are loading, but they're definitely on the server (see attached screenshot showing the flexigrid.css file is there, for example).

 

Are there some file or folder permissions I'm missing?

Attached Thumbnails

  • flexigrid.PNG


#2 Rubans

Rubans

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 15 September 2013 - 05:02 PM

Also, it's probably worth mentioning I've installed Grocery CRUD v.1.4.1 (latest version).



#3 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 15 September 2013 - 10:27 PM

Hello and welcome to the forums Rubans.

Well if you check the actual source of the page and click on any link, e.g. http://rubans.co.uk/...s/flexigrid.css

you will see that this file doesn't load because it doesn't exist. It is the same will all the rest of the files.

What you need to do is to check your path.

Currently the loaded example tries to look for the required files under http://rubans.co.uk/...s/grocery_crud.

Does this folder hierarchy exist?


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#4 Rubans

Rubans

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 16 September 2013 - 02:24 PM

Yes, you're right - the theme files aren't loading.

 

I can confirm the asset files are on the server and the folder hierarchy exists (see screenshot from original post). I don't know why I can't view them in-browser though.

 

I'm running a fresh install of Codeignitor and Grocery CRUD, so I thought it may be something I've missed in the installation of either one...

 

Thanks for responding so far.



#5 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 16 September 2013 - 03:05 PM

Hi Rubans,

 

Can yo cross verify the .htaccess you having is pointing to the right RewriteBaseUrl set to correct path? If you can copy paste / screengrab your complete folder structure .. will be good enough to investigate on the same.

 

Plus if you can also share the server environment you using / deployed upon.



#6 Rubans

Rubans

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 16 September 2013 - 07:38 PM

Hi Amit,

 

I think you've found the error!

 

I had my .htaccess file as follows (as per http://ellislab.com/...neral/urls.html):

 

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
 
I didn't realise that this was restricting access to all other files! I had it like this so that I didn't have the ugly rubans.co.uk/index.php/main/employees for my URL.
 
I don't suppose you know of a way I can have a 'clean' URL like this: rubans.co.uk/main/employees and still have it work do you? 


#7 Rubans

Rubans

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 16 September 2013 - 07:45 PM

Nevermind, I found another set of .htaccess rules which seems to work for now...

 

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
 
Thanks for the help.


#8 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 17 September 2013 - 02:44 PM

Well.. happy to be of the help.. Happy GCing :)



#9 vardas

vardas

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 13 October 2014 - 03:15 PM

I am getting the same problem with the assets not loading and have used the .htaccess version suggested and it makes no difference. Any ideas how to fix this?



#10 ENy91

ENy91

    Newbie

  • Advanced Member
  • Pip
  • 5 posts

Posted 30 October 2015 - 09:06 AM

Hi,

 

I have the same problem, my .htaccess is like you drop Rubans. 

But my css/js files are not load.. 

I check the path, is good. 

 

I'm on Redhat. 

 

 

Thanks a lot ! 

 

Please help



#11 dimitri

dimitri

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 10 September 2016 - 09:57 PM

Although this looks like an exhausted (and resolved..) thread, I would like to comment that having just installed both CodeIgniter and Grocery CRUD, I experienced exactly the same issue.
I realised by reading the thread that it was a matter of a misconfigured (or incomplete) .htaccess as alluded by Ruben three years ago.
My .htaccess was the one recommended for CodeIgniter to improve the look of the URI:

 

RewriteEngine on
RewriteCond $1 !^(index\.php|images|assets|user_guide|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

 

All that was needed was to add another OR clause in the RewriteCond to include 'assets' (as well as 'user_guide' to make the standard Welcome page work fully:

 

RewriteEngine on
RewriteCond $1 !^(index\.php|images|assets|user_guide|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

 

All is fine now, so it's time I got stuck in and continued my self-training
 



#12 Tamás Törő

Tamás Törő

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 09 November 2016 - 10:09 AM

Hi,

 

Im new to grocerycrud and codeigniter, also not very uptodate with web-based programming, so please be kind.. :)

after completing the installation, I getting the example app screen like this:

Export
 
Print
 
 
Name
Last Name
Phone
City
Country
from Employeer
CreditLimit
Actions
Atelier graphique
Schmitt
40.32.2555
Nantes
France
Hernandez
21000
 
Signal Gift Stores
King
7025551838
Las Vegas
USA
Thompson
71800
 
 

 

etc..

 

The header links not working, and apparently no js or css is applied.

 

Any guess what could be wrong?

Chrome's inspect function is telling a bunch of errors like this: GET localhost:8080/CRUD/assets/grocery_crud/themes/flexigrid/js/jquery.printElement.min.js net::ERR_UNKNOWN_URL_SCHEME

 

The URL is correct, if I copy/paste it to my browser is is displayes.

I also tried to alter the htaccess file located in the application folder, but didn't help.

 

Thanks in advance,

Tamas



#13 marsalcrow

marsalcrow

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 03 September 2018 - 06:25 AM

 

Any guess what could be wrong?

Chrome's inspect function is telling a bunch of errors like this: GET localhost:8080/CRUD/assets/grocery_crud/themes/flexigrid/js/jquery.printElement.min.js net::ERR_UNKNOWN_URL_SCHEME

 

 

 

The ERR_UNKNOWN_URL_SCHEME error is commonly because of your browser issue . There's no application on your device which can handle that particular action. It is a Chromium bug . In Chrome version 40 and up, this bug has resurfaced, but only if you are manually entering the URL of the redirect page in the address bar. The issue is on the chromium issue tracker here







Also tagged with one or more of these keywords: theme, css, assets, javascript, loading, stylesheet

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users