Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CLI Interface - Sake - Not Working


Go to End


5 Posts   3306 Views

Avatar
StefanX201

Community Member, 9 Posts

23 April 2014 at 8:30pm

Edited: 23/04/2014 8:31pm

Dear Commuinty,

i followed

http://doc.silverstripe.org/framework/en/topics/commandline
http://www.balbus.tk/creating-tasks/

but still not working in Bash :(

Every file child of /data/www/silverstripe ..so on

_ss_environment.php

global $_FILE_TO_URL_MAPPING;
$_FILE_TO_URL_MAPPING['/data/www/silverstripe'] = 'http://silverstripe.dev';

/data/www/silverstripe/mysite/code/HiTask.php

class HiTask extends BuildTask {
 
    protected $title = 'Say Hi';
 
    protected $description = 'A class that says <strong>Hi</strong>';
 
    protected $enabled = true;
 
    function run($request) {
        echo "I'm trying to say hi...";
    }
}

Shown and Runnable over http://silverstripe.dev/dev/tasks

But when i wil run

/data/www/silverstripe/sake dev/tasks/HiTask
The build task "HiTask" could not be found

same with

/data/www/silverstripe/sake dev/tasks/BuildTask 
The build task "BuildTask" could not be found

Avatar
ss23

Community Member, 9 Posts

23 April 2014 at 8:46pm

Have you tried clearing the cache? The most fool-proof method (to make sure *nothing* has been left over) is to `rm -rf /tmp/silverstripe-cache*` completely.
The build tasks are cached, so you need to remember to flush to be able to see new ones you add.

Avatar
StefanX201

Community Member, 9 Posts

23 April 2014 at 9:08pm

Now it works! I used flush=all 10000 times but not "rm -rf" ... Nice Framwork and CMS but to Docs are often brittle and broken :(

Lot of Thanks!

Avatar
ss23

Community Member, 9 Posts

23 April 2014 at 9:14pm

No problems!

It *should* clear with flush, so if you ever get bored and feel like diving into the internals of SilverStripe, debugging why it didn't work and either updating the documentation or fixing the bug would be much appreciated.

Avatar
StefanX201

Community Member, 9 Posts

23 April 2014 at 9:16pm

Yes of course, i already edit the docs and start a pull request on git project.