CAssetManager.basePath "xxxx /assets" is invalid

This is my first post on the forum, since I haven’t found any related with my problem, so sorry if I’m duplicating any previous post or missing some info.

I’ve applied this extension http://www.yiiframework.com/extension/fullcalendar yesterday, and it worked fine, until I accidentally moved the assets folder to the root of the projects folder, then started having this exception: :(

============

[i]CException

Description

CAssetManager.basePath "/opt/lampp/htdocs/dialer/assets" is invalid. Please make sure the directory exists and is writable by the Web server process.

Source File

/opt/lampp/htdocs/dialer/yii/framework/web/CAssetManager.php(92)[/i]

============

Even I’ve moved back the folder to the right place, removed everything, uncompressed again the extension, etc, it seems that my IDE (maybe) wrote that path somewhere I can’t find where.

If I drop the ‘assets’ folder where it’s trying to reach it (project’s root folder), it works, but that’s not the right way.

Anyone has an idea where that path could be have been written? :unsure:

TIA,

Pampa

Hi Fer,

I have it in my www folder like this:

assets

protected <-- Yii app

js

css

.

.

.

index.php

Dont you have it like this?

As per extension’s instructions: “Extract the release file under protected/extensions”

So I had:

[font="Courier New"]Webroot

± css

± images

± protected

| ± …

| ± extensions

| | ± [color="#FF0000"]assets[/color]

| | ± FullcalendarGraphWidget.php

| | ± FullcalendarWidget.php

| ± …

± … [/font]

Then, accidentally moved it to:

[font="Courier New"]Webroot

± [color="#FF0000"]assets[/color] << moved here

± css

± images

± protected

| ± …

| ± extensions

| | ± [color="#FF0000"]assets[/color] << ‘assets’ were no longer here

| | ± FullcalendarGraphWidget.php

| | ± FullcalendarWidget.php

| ± …

± … [/font]

Then I reverted the situation, but the exception is still there.

Since the directory structure now is as initially, I suspect that maybe the IDE changed automatically (as in some sort of refactoring) some path. The problem is that I don’t know which, and where it is. :(

BTW, If I move the ‘assets’ folder right under the WebRoot folder it works fine… accomplishing the path it’s being examined.

Any clue?

UPDATE:

In FullCalendarWidget.php:


protected function resolvePackagePath(){

    if($this->scriptUrl===null || $this->themeUrl===null){

        $basePath=Yii::getPathOfAlias('application.extensions.fullcalendar.assets');

        

var_dump($basePath); die();


        $baseUrl=Yii::app()->getAssetManager()->publish($basePath);

	if($this->scriptUrl===null)

	    $this->scriptUrl=$baseUrl.'';

	if($this->themeUrl===null)

	    $this->themeUrl=$baseUrl.'';

    }

}



[b][font="Courier New"][color="#FF0000"]>>[/color] string(65) "/opt/lampp/htdocs/dialer/protected/extensions/fullcalendar/assets"

[/font][/b]

So, what’s the deal?

[s]once you move the folder ‘assets’ outside make sure it is writtable…

[/s]

let me review carefully…

Ok, you probably when you moved the assets per accident you overwrited the ‘must have’ assets writtable folder of the app. Do this:

a ) revert and have the extensions as required on the first place

b ) make sure you have your assets folder too! and make it writtable… it will work

;)

[SOLVED]

Cool!

I realized that in the WebRoot there’s also a folder called ‘assets’ (empty by default).

It looks that after I tried to "revert" the accident simple removed that folder so that Yii was complaining!

Then I just ensured that the extension’s “assets” were in place PLUS the default “assets” folder as WebRoot’s child, then CHOMD 777.

Thx Tony! :D