solspace / craft-calendar

Calendar for Craft: The most reliable and powerful event management plugin for Craft.
http://docs.solspace.com/craft/calendar/v5
Other
15 stars 14 forks source link

Saving existing or new entry when no field layout present: Call to a member function getTabs() on null #163

Closed ademers closed 2 years ago

ademers commented 2 years ago

Describe the bug or issue you're experiencing

When I attempt to resave an existing entry or save a new one in a Calendar that doesn't contain a Field Layout with at least one custom field. This type of event doesn't require any custom fields since the Title is self-explanatory. This was previously not an issue.

Error: Call to a member function getTabs() on null in /srv/users/serverpilot/apps/lccphoto/vendor/solspace/craft-calendar/packages/plugin/src/Services/EventsService.php:540
Stack trace:
#0 /srv/users/serverpilot/apps/lccphoto/vendor/solspace/craft-calendar/packages/plugin/src/Services/EventsService.php(216): Solspace\Calendar\Services\EventsService->_respectNonTranslatableFields(Object(Solspace\Calendar\Elements\Event))
#1 /srv/users/serverpilot/apps/lccphoto/vendor/solspace/craft-calendar/packages/plugin/src/Controllers/EventsController.php(248): Solspace\Calendar\Services\EventsService->saveEvent(Object(Solspace\Calendar\Elements\Event))
#2 [internal function]: Solspace\Calendar\Controllers\EventsController->actionSaveEvent()
#3 /srv/users/serverpilot/apps/lccphoto/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#4 /srv/users/serverpilot/apps/lccphoto/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#5 /srv/users/serverpilot/apps/lccphoto/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('save-event', Array)
#6 /srv/users/serverpilot/apps/lccphoto/vendor/craftcms/cms/src/web/Application.php(293): yii\base\Module->runAction('calendar/events...', Array)
#7 /srv/users/serverpilot/apps/lccphoto/vendor/craftcms/cms/src/web/Application.php(602): craft\web\Application->runAction('calendar/events...', Array)
#8 /srv/users/serverpilot/apps/lccphoto/vendor/craftcms/cms/src/web/Application.php(272): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#9 /srv/users/serverpilot/apps/lccphoto/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#10 /srv/users/serverpilot/apps/lccphoto/web/index.php(21): yii\base\Application->run()
#11 {main}

Screenshots:

Steps to reproduce

  1. Create a Calendar that doesn't have a Field Layout with any custom fields.
  2. Create and attempt to save new entry in this Calendar.

Expected behavior

Existing entries are resaved and new entries are saved.

Craft & Plugin Info (please complete the following information):

Additional context

If I add a Field Layout with at least one custom field, I can once again resave existing entries and save new entries. https://share.cleanshot.com/nMKKUczr0rDFfictMSlf

kjmartens commented 2 years ago

Sorry about this @ademers. We'll get this fixed shortly. 🙂

ademers commented 2 years ago

@kjmartens @seandelaney Do you have an ETA? It's been almost 3 weeks and my users really need to be able to create events! Thanks!

kjmartens commented 2 years ago

Hi @ademers,

Thank you for your patience. We have now released Calendar 3.3.16, which resolves this issue. 🙂