So, I've created a plugin which has to send dynamic data to an entry in the control panel, using a custom field type

I get an error in the ajax call, saying that the URL to which I'm posting is not found. I've debugged this and the URL generated is the right one, I've tried posting to it from other places and it works just fine

This is what I have so far

The custom field

public function getInputHtml($name, $value)


    return craft()->templates->render('baseinstagram/input/choosetag', array(
        'name'  => $name,
        'value' => $value

The ajax call

$(document).ready(function () {

var url = Craft.getActionUrl('baseinstagram/main/testy');

$('.pullme').click(function () {
        method : 'POST',
        url : url,
        success : function () {
        error : function() {


the controller

public function actionTesty() {



1 Answer 1


Fixed it, it was just a matter of proper capitalization

var url = Craft.getActionUrl('baseinstagram/main/testy');

Should have been

var url = Craft.getActionUrl('Baseinstagram/Main/Testy');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.