<p>My guess is it's a case sensitivity issue between your plugin class names and the names of those files on the file system.</p>

<p>If you're on an NTFS filesystem on Windows, it is case sensitive.  I recommend generating boilerplate plugin code from something like <a href="https://pluginfactory.io/" rel="nofollow noreferrer">https://pluginfactory.io/</a> (they even have a tasks checkbox) to help avoid issues like this.</p>

CC BY-SA 3.0
2017-07-03T13:57:26.760Z
Thanks for the link. That, together with some tweeks to the cases used in the function calls in the code, allowed me to get get it working.
Martin Twigg
CC BY-SA 3.0
2017-07-04T02:54:30.767Z
Awesome! Would you mind marking it as an accepted answer?
Brad Bell
CC BY-SA 3.0
2017-06-30T21:07:34.797Z
2017-06-30T21:07:34.797Z
Brad Bell
<p>I have a Craft plugin that works fine on a live site and on Macs. I have recently installed MAMP (Windows) on my development machine and now, when I try to run one of the plugins commands by using GIT to CD to the Yiic console ... /c/mamp/htdocs/websitename/craft/app/etc/console ... and run the command ... php yiic pluginname commandname ... I get the error message ... Encountered an error running task 700 (plugin_task): Could not find the task component type.</p>

<p>I am pretty sure that the problem is that the task file is not being found, but I think I have the upper/lower case elements correct:</p>

<p>\pluginname\consolecommands\PluginnameCommand.php</p>

<pre><code>&lt;?php
namespace Craft;

class PluginnameCommand extends BaseCommand
{
  public function actionUpdate($testError = false)
  {
      $task = craft()-&gt;tasks-&gt;createTask('pluginname_event', 'Updating data', [
            'testError' =&gt; $testError,
      ]);
      craft()-&gt;tasks-&gt;runTask($task);
  }
}
</code></pre>

<p>\pluginname\tasks\Pluginname_EventTask.php</p>

<pre><code>&lt;?php
namespace Craft;

class Pluginname_EventTask extends BaseTask
{
}
</code></pre>

<p>Have I the cases wrong, or am I missing something in setup?</p>

<p>Note that this is a followup to ... <a href="https://craftcms.stackexchange.com/questions/21010/running-console-yiic-under-mamp-windows">Running console (yiic) under MAMP (Windows)</a> ... which was a path problem solved by modifying the yiic file.</p>

<yiic>
Plugin - Possible path problem in MAMP - Could not find the task component type
# Plugin - Possible path problem in MAMP - Could not find the task component type

(Asked by: username_0 on 2017-06-30)

I have a Craft plugin that works fine on a live site and on Macs. I have recently installed MAMP (Windows) on my development machine and now, when I try to run one of the plugins commands by using GIT to CD to the Yiic console ... /c/mamp/htdocs/websitename/craft/app/etc/console ... and run the command ... php yiic pluginname commandname ... I get the error message ... Encountered an error running task 700 (plugin_task): Could not find the task component type.
I am pretty sure that the problem is that the task file is not being found, but I think I have the upper/lower case elements correct:
\pluginname\consolecommands\PluginnameCommand.php
tasks->createTask('pluginname_event', 'Updating data', [
            'testError' => $testError,
      ]);
      craft()->tasks->runTask($task);
  }
}

\pluginname\tasks\Pluginname_EventTask.php

Have I the cases wrong, or am I missing something in setup?
Note that this is a followup to ... Running console (yiic) under MAMP (Windows) ... which was a path problem solved by modifying the yiic file.

**Tags:** yiic


---

## 1 answers

### Answer by username_1 on 2017-06-30. Score: 0 | Accepted answer

My guess is it's a case sensitivity issue between your plugin class names and the names of those files on the file system.

If you're on an NTFS filesystem on Windows, it is case sensitive. I recommend generating boilerplate plugin code from something like <https://pluginfactory.io/> (they even have a tasks checkbox) to help avoid issues like this.

> **Comments:**
> **username_0**: Thanks for the link. That, together with some tweeks to the cases used in the function calls in the code, allowed me to get get it working.  
> **username_1**: Awesome! Would you mind marking it as an accepted answer?  

---

