Yii Framework Forum: Yii Booster Css File Not Loading - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii Booster Css File Not Loading http://yiiframework.com/extension/yiibooster Rate Topic: -----

#1 User is offline   shingionline 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 28-October 12

Posted 08 November 2012 - 06:17 AM

Hello everyone,

I'm using the Yii Booster extension which i have extracted into the directory
protected/extensions/bootstrap


I am trying to create two buttons using the code below:-

$this->widget('ext.bootstrap.widgets.TbButton',array(
	'label' => 'Primary',
	'type' => 'primary',
	'size' => 'large'
));

$this->widget('ext.bootstrap.widgets.TbButton',array(
	'label' => 'Secondary',
	'size' => 'large'
));


My problem is that the stylesheet is not loading so i just get the button labels printed next to each other without the actual button. Please let me know where i could be going wrong with the configuration.

Please see attached images

Thanks

Attached File(s)


0

#2 User is offline   Adriano Mendes 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 13-October 11
  • Location:Brazil

Posted 08 November 2012 - 06:42 AM

download the full bootstrap on the official website http://twitter.github.com/bootstrap/
and place the css folder localhost/yiiapp/css
0

#3 User is offline   resurtm 

  • Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 83
  • Joined: 19-December 10

Posted 08 November 2012 - 07:56 AM

View PostAdriano Mendes, on 08 November 2012 - 06:42 AM, said:

download the full bootstrap on the official website http://twitter.github.com/bootstrap/
and place the css folder localhost/yiiapp/css


You're not right. YiiBooster made as ready to be instantly used solution, without need to download additional stuff (bootstrap itself, styles, etc.).
0

#4 User is offline   shingionline 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 28-October 12

Posted 08 November 2012 - 07:57 AM

View PostAdriano Mendes, on 08 November 2012 - 06:42 AM, said:

download the full bootstrap on the official website http://twitter.github.com/bootstrap/
and place the css folder localhost/yiiapp/css


I have already downloaded the full yii booster package and extracted it into

protected/extensions/bootstrap


My problem is that the CSS files are not being loaded.

Attached File(s)


0

#5 User is offline   resurtm 

  • Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 83
  • Joined: 19-December 10

Posted 08 November 2012 - 07:58 AM

View Postshingionline, on 08 November 2012 - 06:17 AM, said:

I'm using the Yii Booster extension which i have extracted into the directory
protected/extensions/bootstrap



Did you learned about YiiBooster installation process? You can find it here: http://yii-booster.c...ng-started.html

Installation of the YiiBooster is not just copying directory.
0

#6 User is offline   shingionline 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 28-October 12

Posted 08 November 2012 - 08:02 AM

View Postresurtm, on 08 November 2012 - 07:58 AM, said:

Did you learned about YiiBooster installation process? You can find it here: http://yii-booster.c...ng-started.html

Installation of the YiiBooster is not just copying directory.


Yes i did follow the installation process for Yii boster as best as I could, maybe I made a mistake somewhere. Attached is my protected/config/main.php file

Attached File(s)

  • Attached File  main.php (3.6K)
    Number of downloads: 41

0

#7 User is offline   resurtm 

  • Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 83
  • Joined: 19-December 10

Posted 08 November 2012 - 08:33 AM

Your configuration file is incorrect. Here is the problem part:

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'class' => 'WebUser',
            'allowAutoLogin'=>true,
            'loginUrl' => array('/user/login'),
			
		'bootstrap' => array(
	    'class' => 'ext.bootstrap.components.Bootstrap',
	    'responsiveCss' => true,
	
	),


Note that 'bootstrap' shouldn't be child of the 'user' (as you have know). It's application component and should be placed in the 'components' array. Correct code:

'user'=>array(
	// enable cookie-based authentication
	'class' => 'WebUser',
	'allowAutoLogin'=>true,
	'loginUrl' => array('/user/login'),
),		
'bootstrap' => array(
	'class' => 'ext.bootstrap.components.Bootstrap',
	'responsiveCss' => true,
),

0

#8 User is offline   Adriano Mendes 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 13-October 11
  • Location:Brazil

Posted 08 November 2012 - 08:52 AM

View Postshingionline, on 08 November 2012 - 07:57 AM, said:

I have already downloaded the full yii booster package and extracted it into

protected/extensions/bootstrap


My problem is that the CSS files are not being loaded.


you can not put the folder in css
protected/extensions/bootstrap


protected because the folder is protected or a browser can access this folder.

why should you put in lacalhost/yiiapp/css
0

#9 User is offline   resurtm 

  • Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 83
  • Joined: 19-December 10

Posted 08 November 2012 - 09:02 AM

View PostAdriano Mendes, on 08 November 2012 - 08:52 AM, said:

you can not put the folder in css
protected/extensions/bootstrap


protected because the folder is protected or a browser can access this folder.

why should you put in lacalhost/yiiapp/css


It's okay to put assets files to the protected directory since YiiBooster fully leverages CAssetManager component features. They will be published in the assets folder (which is publicly available) after first application run.
1

#10 User is offline   Adriano Mendes 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 13-October 11
  • Location:Brazil

Posted 08 November 2012 - 09:14 AM

View Postresurtm, on 08 November 2012 - 09:02 AM, said:

It's okay to put assets files to the protected directory since YiiBooster fully leverages CAssetManager component features. They will be published in the assets folder (which is publicly available) after first application run.


did not know, thank Resurtm
0

#11 User is offline   shingionline 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 28-October 12

Posted 08 November 2012 - 11:15 AM

View Postresurtm, on 08 November 2012 - 08:33 AM, said:

Your configuration file is incorrect. Here is the problem part:

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'class' => 'WebUser',
            'allowAutoLogin'=>true,
            'loginUrl' => array('/user/login'),
			
		'bootstrap' => array(
	    'class' => 'ext.bootstrap.components.Bootstrap',
	    'responsiveCss' => true,
	
	),


Note that 'bootstrap' shouldn't be child of the 'user' (as you have know). It's application component and should be placed in the 'components' array. Correct code:

'user'=>array(
	// enable cookie-based authentication
	'class' => 'WebUser',
	'allowAutoLogin'=>true,
	'loginUrl' => array('/user/login'),
),		
'bootstrap' => array(
	'class' => 'ext.bootstrap.components.Bootstrap',
	'responsiveCss' => true,
),



Thank you very much, i made this change and now all is working perfectly. Thank you also to everyone who responded to this thread :rolleyes:
0

#12 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 09 December 2012 - 07:16 AM

View Postresurtm, on 08 November 2012 - 09:02 AM, said:

It's okay to put assets files to the protected directory since YiiBooster fully leverages CAssetManager component features. They will be published in the assets folder (which is publicly available) after first application run.


Thank you resurtm! Great support
┬┐How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#13 User is offline   Tiago F. 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 28-March 14

Posted 28 March 2014 - 01:07 PM

Hi, I use the Yiibooster extension and my css is not loading.
The extension is loading, but these css files no.
Look my files main.php and my firebug log.

Someone can help me?

Attached File(s)


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users