<p>When your plugin has a camel cased name you need to make sure you camel case your references to it, such as when you try and visit an action url.</p>

<p>I assume this is due to when craft tries to resolve the url it sees <code>pluginname</code> and <code>pluginName</code> as two different things, much like php variables. </p>

<p>I would also assume this is due to the way Craft autoloads classes.</p>

<p>So using <code>webMentionReciever</code> would resolve since it would be a "exact" match to your plugin name.</p>

<p>This isn't limited to just plugin names, the same goes for any service, controller etc references too.</p>

CC BY-SA 3.0
2015-09-24T21:08:25.470Z
2015-09-24T21:08:25.470Z
Alec Ritson
<p>Ok once again I'm having an issue with a plugin controller. It was working once upon a time but stopped sometime in the past year.</p>

<p>I have stripped the plugin down to bare, so there is no reason it shouldn't be working.</p>

<p>File Structure:</p>

<pre><code>craft/plugins/
--webmentionreceiver/
----controllers/
------WebMentionReceiver_EndpointController.php
----WebMentionReceiverPlugin.php
</code></pre>

<p>craft/plugins/webmentionreceiver/controllers/WebMentionReceiver_EndpointController.php:</p>

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

    class WebMentionReceiver_EndpointController extends BaseController  {
                protected $allowAnonymous = array("actionReceive");

                public function actionReceive()  {
                        $this-&gt;redirect('/');
                }
        }
?&gt;
</code></pre>

<p>So the plugin name is <code>WebMentionReceiver</code>, the controller is <code>Endpoint</code> and the action is <code>Receive</code>. So <code>index.php?p=actions/webmentionreceiver/endpoint/receive</code> should be the URL. But it 404s.</p>

<p>Any ideas? It is driving me mad!</p>

CC BY-SA 3.0
2015-09-24T20:16:08.423Z
Does camel casing the plugin name do anything so: 'webMentionReceiver' ?
Alec Ritson
CC BY-SA 3.0
2015-09-24T20:33:11.480Z
Yes! That has worked. Thanks so much. Didn't realise the URL would be case sensitive.
Shane Hudson
CC BY-SA 3.0
2015-09-24T21:00:54.550Z
@AlecRitson Could you post camel casing the URL as an answer please? Then I can choose it :)
Shane Hudson
CC BY-SA 3.0
2015-09-24T21:08:47.387Z
No worries! Glad it helped, tried to give a bit more info in the answer :)
Alec Ritson
<controller><routing><404>
Controller Action 404
# Controller Action 404

(Asked by: username_0 on 2015-09-24)

Ok once again I'm having an issue with a plugin controller. It was working once upon a time but stopped sometime in the past year.
I have stripped the plugin down to bare, so there is no reason it shouldn't be working.
File Structure:
craft/plugins/
--webmentionreceiver/
----controllers/
------WebMentionReceiver_EndpointController.php
----WebMentionReceiverPlugin.php

craft/plugins/webmentionreceiver/controllers/WebMentionReceiver_EndpointController.php:
redirect('/');
                }
        }
?>

So the plugin name is WebMentionReceiver, the controller is Endpoint and the action is Receive. So index.php?p=actions/webmentionreceiver/endpoint/receive should be the URL. But it 404s.
Any ideas? It is driving me mad!

**Tags:** controller, routing, 404

> **Comments:**
> **username_1**: Does camel casing the plugin name do anything so: 'webMentionReceiver' ?  
> **username_0**: Yes! That has worked. Thanks so much. Didn't realise the URL would be case sensitive.  
> **username_0**: @AlecRitson Could you post camel casing the URL as an answer please? Then I can choose it :)  
> **username_1**: No worries! Glad it helped, tried to give a bit more info in the answer :)  

---

## 1 answers

### Answer by username_1 on 2015-09-24. Score: 4 | Accepted answer

When your plugin has a camel cased name you need to make sure you camel case your references to it, such as when you try and visit an action url.

I assume this is due to when craft tries to resolve the url it sees `pluginname` and `pluginName` as two different things, much like php variables.

I would also assume this is due to the way Craft autoloads classes.

So using `webMentionReciever` would resolve since it would be a "exact" match to your plugin name.

This isn't limited to just plugin names, the same goes for any service, controller etc references too.


---

