⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Theme / Assets Not Loading



Rubans
  • profile picture
  • Member

Posted 15 September 2013 - 16:54 PM

I've just followed the installation guide for newbies here: http://www.grocerycrud.com/documentation/create-crud-codeigniter-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?


Rubans
  • profile picture
  • Member

Posted 15 September 2013 - 17:02 PM

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


davidoster
  • profile picture
  • Member

Posted 15 September 2013 - 22:27 PM

Hello and welcome to the forums [member=rubans].

Well if you check the actual source of the page and click on any link, e.g. http://rubans.co.uk/assets/grocery_crud/themes/flexigrid/css/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/assets/grocery_crud.

Does this folder hierarchy exist?


Rubans
  • profile picture
  • Member

Posted 16 September 2013 - 14: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.


Amit Shah
  • profile picture
  • Member

Posted 16 September 2013 - 15: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.


Rubans
  • profile picture
  • Member

Posted 16 September 2013 - 19:38 PM

Hi Amit,

 

I think you've found the error!

 

I had my .htaccess file as follows (as per http://ellislab.com/codeigniter/user-guide/general/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? 

Rubans
  • profile picture
  • Member

Posted 16 September 2013 - 19: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.

Amit Shah
  • profile picture
  • Member

Posted 17 September 2013 - 14:44 PM

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


vardas
  • profile picture
  • Member

Posted 13 October 2014 - 15: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?


ENy91
  • profile picture
  • Member

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


dimitri
  • profile picture
  • Member

Posted 10 September 2016 - 21: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
 


Tamás Törő
  • profile picture
  • Member

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


marsalcrow
  • profile picture
  • Member

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