Updating a plugin to Craft 3 (also changed its name). I know this is probably something very simple, like capitalization, but can anyone point out what's wrong?
Firefox console shows a 404 for
http://f.test/index.php?p=admin/actions/dryCalendar/calendarOccurrencesField/generateAjaxMiniCalendar
and then
Type error: Response is null
So perhaps Craft is getting the request, but $this->returnJson($response);
isn't terminating the request, i.e. Craft continues to try to find a page to match?
My files are set up like this:
DryCalendar.php
controllers/DryCalendar_CalendarOccurrencesFieldController.php
is
<?php
namespace Craft;
//namespace kr37\drycalendar\controllers;
use Craft;
use craft\base\Controller;
class DryCalendar_CalendarOccurrencesFieldController extends BaseController
{
public function actionGenerateAjaxMiniCalendar() {
...
$this->returnJson($response);
}
}
and in my Garnish js is
Craft.postActionRequest(
'dryCalendar/calendarOccurrencesField/generateAjaxMiniCalendar',
data,
function(response) {
...
});
Thanks for any help!