Module Unable to Publish Assets Directory


<?php


class BlogModule extends CWebModule

{


  public function init()

  {

    // this method is called when the module is being created

    // you may place code here to customize the module or the application

    $assetsDirectory = Yii::app()->assetManager->publish(Yii::getPathOfAlias('blog.assets'));

    Yii::app()->clientScript->registerCssFile($assetsDirectory . '/css/blog.css');


    // import the module-level models and components

    $this->setImport(array(

      'blog.models.*',

      'blog.components.*',

      // 3rd party extensions

      'blog.extensions.yiiext.behaviors.model.taggable.*',

    ));

  }


  public function beforeControllerAction($controller, $action)

  {

    if (parent::beforeControllerAction($controller, $action))

    {

      // this method is called before any module controller action is performed

      // you may place customized code here

      return true;

    }

    else

      return false;

  }


}

Yii::getPathOfAlias(‘blog.assets’)

C:\xampp\htdocs\gen\protected\modules\blog\assets

$assetsDirectory

/gen/assets/3c3a6db0

Nothing gets moved to the base application assets directory even though it looks like it has completely successfully. Any ideas?

I am having the same issue with an extension I downloaded.

Care to share what extension it is?

Hi, I have had this issue in the past and clearing my /assets directory has fixed it for me. Hope this helps.

PS: By /assets directory I mean the base /assets folder that is populated by AssetManager.