FullCalendar 404 error on dependant files

Hello all,

I am trying to use this extension:

FullCalendar

However when I do so it would appear the external java and css files needed for this don’t link properly.

I assume I have missed something in the link above, but I can’t see what I have done wrong.

Here is what the console reports when I load the page:


GET http://localhost/sandbox/admin/assets/ba9ba9aa/fullcalendar.print.css [HTTP/1.1 404 Not Found 0ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/fullcalendar.css [HTTP/1.1 404 Not Found 0ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/fullcalendar.js [HTTP/1.1 404 Not Found 5ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/gcal.js [HTTP/1.1 404 Not Found 15ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/lang-all.js [HTTP/1.1 404 Not Found 14ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/lang/en-US.js [HTTP/1.1 404 Not Found 14ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/fullcalendar.js [HTTP/1.1 404 Not Found 1ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/gcal.js [HTTP/1.1 404 Not Found 1ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/lang-all.js [HTTP/1.1 404 Not Found 1ms]

GET http://localhost/sandbox/admin/assets/ba9ba9aa/lang/en-US.js [HTTP/1.1 404 Not Found 0ms]

TypeError: $(...).fullCalendar is not a function index.php:280



So, I have the following code:

views\calendar\index.php


<?php


$events = array();

  //Testing

  $Event = new \yii2fullcalendar\models\Event();

  $Event->id = 1;

  $Event->title = 'Testing';

  $Event->start = date('Y-m-d\TH:m:s\Z');

  $events[] = $Event;


  $Event = new \yii2fullcalendar\models\Event();

  $Event->id = 2;

  $Event->title = 'Testing';

  $Event->start = date('Y-m-d\TH:m:s\Z',strtotime('tomorrow 6am'));

  $events[] = $Event;

  ?>


<div class="calendar-index">

  <?= \yii2fullcalendar\yii2fullcalendar::widget(array(

      'events'=> $events,

  ));?>

</div>

CalendarController.php


<?php

namespace backend\controllers;


use Yii;

use yii\web\Controller;

use yii\filters\VerbFilter;


/**

 * Site controller

 */

class CalendarController extends Controller

{

    /**

     * @inheritdoc

     */

    public function behaviors()

    {

        return [

            'verbs' => [

                'class' => VerbFilter::className(),

                'actions' => [

                    'delete' => ['post'],

                ],

            ],

        ];

    }


    /**

     * @inheritdoc

     */

    public function actions()

    {

        return [

            'error' => [

                'class' => 'yii\web\ErrorAction',

            ],

        ];

    }


    public function actionIndex()

    {

        return $this->render('index');

    }


}



Looks like the extension has not loaded the assets and is missing those files in the assets directory.

If you have done everything the extension told you to do, looks like a problem with the extension itself.

Hi,

pls. check if you have the latest plugin fxp/composer-assets installed. The behaviour you describe was the result of not having it up and running for a couple times…:(

Thanks!

in my case it working.

have u properly install?

suggest u to run this :


composer update

Ah ha!

added "fxp/composer-asset-plugin": "*" to my composer require file and updated and this now works!

However I see from the console I have a deprecated function warning, so I will report that to the creators of fullcalendar, as I assume this is their issue to fix?


"Deprecation warning: moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779" moment.js:724

So the basic example seems to give me a caldendar to display, but I was wondering how to make this an editable calendar?

EDIT: Hold fire, I just found the git basic app example, so downloading that now.