Asset Deletion

Hi,

Sometimes when Yii is publishing assets it deletes the original assets from the extensions folder.

I have tried setting linkAssets of the asset manager to both true and false.

Sometimes it also deletes the contents of framework/web/js/source.

Is there something else that can be done to stop it deleting the original assets?

using yii 1.1.13 and PHP 5.4.4, although it does / did do it on different versions as well

cheers,

blinky

bump

Well, if this is also deleting from your webroot/js/ folder then you should place your all JS and CSS file in themes folder and accordingly include it it your project.

But why you want to stop deletion of this Assets ?? Is it something different you are trying to do here.

Thanks for the suggestion, but have multiple projects and its easier to manage and I would guess good practise to keep the extension assets with the extension.

I don’t want to stop it deleting the files in the root assets folder, but it is deleting files from protected->extensions->myExtension->assets folder so when it tries to copy to the root assets folder there’s nothing there to copy.

But it doesn’t do it all the time either, it seems to be random :blink:

Its a strange :unsure:

By the way how are you managing your directories on server.

erm… not sure what you mean, sorry

locally we have the projects in their own contained folders in the MAMP htdocs folder

on the server the projects have their own domain (usually VPS)

it seems to happen more when working locally and hardly at all on a server except when uploading an update to the site (not normally to do with the extensions though)

Ok, but its quite strange thing you are saying that randomly its delete assests folder.Thats why i am saying.Since if you are setting LinkAssets property of Assest manager then it should be simultaneously.But random quite strange.

Did you get something in your application log and server log.? ???

No, only get messages in the application log about it couldn’t find the file in the root assets folder…

I suppose just stick with it until a pattern emerges…

cheers for ur help tho :)