Code Monkey home page Code Monkey logo

craft-calendar's People

Contributors

angrybrad avatar dependabot[bot] avatar gustavs-gutmanis avatar kjmartens avatar mikejpeters avatar qrazi avatar seandelaney avatar superextinct avatar thinkgraphical avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

craft-calendar's Issues

Cannot delete disabled events from calendar view

Describe the bug or issue you're experiencing
In the calendar view (monthly for example) if one mouses over an event, a popup appears with a “delete” option. If the event is disabled, pressing that delete button does nothing.

Steps to reproduce

  1. Set an event to disabled
  2. Go to the monthly calendar view
  3. Mouse-over the disabled (greyed-out) event and press the “delete” button.
  4. Observe the event does not get deleted - you can open the event and it’s still there (and still set to disabled).

Expected behavior

The delete button should work. With enabled events (not greyed-out), this delete button does work.

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

  • Craft Version: Pro 3.6.17
  • Calendar Version: 3.3.2
  • Calendar Edition: Lite
  • Fresh Install or Upgrade: Fresh

Additional context

Happens on local environment and on the server hosting the live site.

Multi-site index pages with calendar for only one site

We have a craft install setup with 5 sites, but there is only one calendar, which is only enabled for one site.

screen shot 2018-04-02 at 4 04 06 pm

When you view the events index, admin/calendar/events, it shows multiple sites in the dropdown.

screen shot 2018-04-02 at 4 04 26 pm

Seems like this dropdown shouldn't be visible since there are events enabled for only one site.

Craft CMS 3.0.0-RC17.1
Calendar 2.0.0-beta.7

Permissions for events in specific calenders are saved with ID instead of UID

Describe the bug or issue you're experiencing

Permissions for events in specific calenders are saved with ID instead of UID to Project Config

Steps to reproduce

  1. Add a usergroup with permissions to add events in a specific calendar
  2. See the ID of the calendar appear in the Project config yaml, instead of UID

Expected behavior

Expect to see UID in project config

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

  • Craft Version: 3.7.13
  • Calendar Version: 3.3.5
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Fresh

Additional context

GraphQL query returns an error if the query contains a fragment

If you attempt to make a GraphQL query to Calendar and that query contains a fragment, the query will result in an error. Interestingly this is only reproducible when devMode is false. If devMode is true, the query will succeed.

Steps to reproduce

  1. Make a query similar to this when devMode is disabled:
fragment myCalendarFields on events_Event {
  eventCategory {
    slug
    title
  }
  eventDescription
}

query getMonthEvents {
  solspace_calendar {
    events {
      id
      title
      startDateLocalized
      endDateLocalized
      allDay
      freq
      ...myCalendarFields
    }
  }
}

Expected behavior
The query should succeed.

What actually happens

2021-06-23 17:45:34 [-][-][-][error][craft\errors\GqlException] craft\errors\GqlException: Tried to load an unregistered type "events_Event". This can indicate both a typo in the query or an issue with the schema used. in .../.../vendor/craftcms/cms/src/gql/TypeLoader.php:39

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

  • Craft Version: 3.6.17
  • Calendar Version: 3.3.1
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Fresh

Additional context

In devMode this isn't a problem. It's only reproducible when devMode is disabled.

Trying to change the licence get an error

Hello

We purchase the wrong licence "standard instead of pro" and we cannot switch (we got an error)

We we click on switch button, we got a error

Screen Shot 2021-10-06 at 11 19 05 AM

Someone can help ?

Thank you.

ICS Export Error: strip_tags() expects parameter 1 to be string, object given Related to ICS Location Field

Describe the bug or issue you're experiencing

When I attempt to export events as an ICS file, I get the following error:

strip_tags() expects parameter 1 to be string, object given

 in /home/vagrant/sites/lccphoto/vendor/solspace/craft3-calendar/packages/plugin/src/Library/Export/ExportCalendarToIcs.php at line 92
8384858687888990919293949596979899100101

 
        $exportString .= "BEGIN:VEVENT\r\n";
        $exportString .= sprintf("UID:%[email protected]\r\n", $uidHash);
        $exportString .= sprintf("DTSTAMP:%s\r\n", $this->now->format(self::DATE_TIME_FORMAT));
 
        if ($description) {
            $exportString .= sprintf("DESCRIPTION:%s\r\n", $this->prepareString(strip_tags($description)));
        }
        if ($location) {
            $exportString .= sprintf("LOCATION:%s\r\n", $this->prepareString(strip_tags($location)));
        }
 
        if ($event->isAllDay()) {
            $exportString .= sprintf("DTSTART;VALUE=DATE:%s\r\n", $startDate->format(self::DATE_FORMAT));
            $exportString .= sprintf(
                "DTEND;VALUE=DATE:%s\r\n",
                $endDate->copy()->addDay()->format(self::DATE_FORMAT)
            );
        } elseif ('UTC' === $timezone) {

I'm using the Maps plugin which provides a field type that I'm using for event locations. It seems that the plugin is generating and object instead of a string expected by Calendar

Steps to reproduce

  1. Install Maps plugin and create a field called Event Location with Map field type.
  2. Assign Event Location field to ICS Location field in one or more Calendars.
  3. Create ICS Export template.
  4. Attempt to download ICS file.
  5. See error above.

Expected behavior

Download ICS file containing event location without errors.

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

  • Craft Version: Craft Pro 3.7.11
  • Calendar Version: 3.3.5
  • Calendar Edition: Pro
  • Fresh Install or Upgrade:

Additional context

Maps plugin 3.9.2 Lite edition

Custom fields for events already implemented?

Hi,

Are custom fields for events already implemented like the docs for Craft 2 mention?
I cannot seem to add a description field for instance to an event.

BTW the plugin looks great!

Translation of certain elements in the repeat rule properties are not taken into account

I'm trying to translate the plugin content in french following the documented procedure https://docs.solspace.com/craft/calendar/v3/setup/translating.html
Some elements, included in the original vendor/solspace/craft3-calendar/src/translations/en-US/calendar.php file are not taken into account when translated.

Steps to reproduce

  1. Copy vendor/solspace/craft3-calendar/src/translations/en-US/calendar.php to translations/fr/calendar.php
  2. Translate the elements. Affected entries are :
'End repeat' => 'Fin de la répétition',
'Except on' => 'Excepté le',
  1. On the event edition page, the elements are still displayed in english :
    image

Expected behavior
The text should be translated

Craft & Plugin Info :

  • Craft Version: 3.6.17
  • Calendar Version: 3.3.0
  • Calendar Edition: PRO
  • Fresh Install or Upgrade: Fresh Install

Custom "Title Format" not working

I'm adding events through the Craft CP, and I'm trying to replace the default title field with a custom field as described in the instruction {fieldHandle}

In my case the custom field is a Users field. Is this possible? I've tried with a plain text field as well, but that doesn't work either. It still just says "Title" and whatever I enter there, I get Could not save event trying to save.

screen shot 2018-03-12 at 13 51 07

Calendar doesn't support Project Config for fields

Describe the bug or issue you're experiencing
I just launched a new feature on a client site, where I added a new field to calendar events. I deployed and expected no other changes needed, until I realised that the field hadn't been added to the event on the live server. Looks like Calendar events aren't using Project Config. Is this on the roadmap?

Steps to reproduce

  1. Add a field locally to a calendar
  2. Deploy
  3. Have to add the field again on the new environment

Expected behavior
Project Config should be recording field changes and update the other environment on running ./craft project-config/apply

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

  • Craft Version: 3.6.11.2
  • Calendar Version: 3.2.1
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Upgrade

Element editor slideout doesn't display title or date fields

Describe the bug or issue you're experiencing

In the control panel, when viewing an entry with a Calendar Events field, double clicking on the related event opens the Element Editor Slideout but only custom fields are displayed.

Screenshot from 2021-09-01 08-46-03

Steps to reproduce

  1. Create a custom Calendar Events field and and add it to an entry type
  2. Create/edit an entry and select an event
  3. Double-click on the selected event

Expected behavior

It would be great if all event fields were editable from the slideout.

Craft & Plugin Info:

  • Craft Version: 3.7.8
  • Calendar Version: 3.3.3
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Fresh Install

Problem with non-US date formats

I've just changed the language setting on my user account from English (United States) to English (United Kingdom).

This setting is what determines date formats in the control panel.

US format being m/d/Y
UK / AUS being d/m/Y

This is causing the issue below with Carbon.

Does craft have a helper function to assist with this?

Exception
DateTime::__construct(): Failed to parse time string (15/3/2018 11:00) at position 0 (1): Unexpected character
1. in /srv/users/com/apps/dev1/vendor/nesbot/carbon/src/Carbon/Carbon.php at line 412
403404405406407408409410411412413414415416417418419420421                                }
        }
        // @codeCoverageIgnoreEnd
 
        // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127
        if (strpos((string) .1, '.') === false) {
            $locale = setlocale(LC_NUMERIC, '0');
            setlocale(LC_NUMERIC, 'C');
        }
        parent::__construct($time, $timezone);
        if (isset($locale)) {
            setlocale(LC_NUMERIC, $locale);
        }
        static::setLastErrors(parent::getLastErrors());
    }
 
    /**
     * Create a Carbon instance from a DateTime one.
     *
                
2. in /srv/users/com/apps/dev1/vendor/nesbot/carbon/src/Carbon/Carbon.php at line 412 – DateTime::__construct('15/3/2018 11:00', DateTimeZone)
406407408409410411412413414415416417418                     
        // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127
        if (strpos((string) .1, '.') === false) {
            $locale = setlocale(LC_NUMERIC, '0');
            setlocale(LC_NUMERIC, 'C');
        }
        parent::__construct($time, $timezone);
        if (isset($locale)) {
            setlocale(LC_NUMERIC, $locale);
        }
        static::setLastErrors(parent::getLastErrors());
    }
 
                
3. in /srv/users/com/apps/dev1/vendor/solspace/craft3-calendar/src/Controllers/EventsController.php at line 188 – Carbon\Carbon::__construct('15/3/2018 11:00', 'utc')
182183184185186187188189190191192193194                            $isNewAndPublic = !$event->id && !$isCalendarPublic;
        if ($eventId || $isNewAndPublic) {
            CalendarPermissionHelper::requireCalendarEditPermissions($event->getCalendar());
        }
 
        if (isset($values['startDate'])) {
            $event->startDate = new Carbon($values['startDate']['date'] . ' ' . $values['startDate']['time'], DateHelper::UTC);
        }
 
        if (isset($values['endDate'])) {
            $event->endDate = new Carbon($values['endDate']['date'] . ' ' . $values['endDate']['time'], DateHelper::UTC);
        }

Thanks :)

Invalid argument supplied for foreach()

Describe the bug or issue you're experiencing

When retrieving events grouped by month (related to an entry) and no events are found,
there's a Invalid argument supplied for foreach() thrown in /solspace/craft3-calendar/packages/plugin/src/Elements/Db/EventQuery.php on line 581.

When debugging $this->eventsByMonth on that line, it's NULL instead of an empty array.

Steps to reproduce

  1. Retrieve events grouped by month related to an entry with no results
{% set eventsGroupedByMonth = craft.calendar.events({
    calendar: 'classes',
    relatedTo: entry
}).groupedByMonth() %}

Expected behavior

Silently failing

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

  • Craft Version: 3.7.13
  • Calendar Version: 3.3.5
  • Calendar Edition: Lite (trial)

Additional context

PHP Fatal Error 'yii\base\ErrorException' with message 'Class 'craft\gql\base\Generator' not found'

Describe the bug or issue you're experiencing

When attempting to update from 3.0.15 to 3.3.1 on Craft 3.5.19.1 after running ./craft migrate/all command:

vagrant@homestead:~/sites/example$ ./craft migrate/all
PHP Fatal Error 'yii\base\ErrorException' with message 'Class 'craft\gql\base\Generator' not found'

in /home/vagrant/sites/example/vendor/solspace/craft3-calendar/packages/plugin/src/Bundles/GraphQL/Types/Generators/AbstractGenerator.php:11

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}

Steps to reproduce

  1. Set Calendar version to 3.3.1 in composer.json
  2. Run composer update
  3. Run ./craft migrate/all
  4. See error shown above

Expected behavior

No errors after running ./craft migrate/all.

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

  • Craft Version: 3.5.19.1 (upgrading to 3.6.x currently not an option)
  • Calendar Version: 3.3.1
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Upgrade

Additional context

Update: In the meantime, I successfully updated to 3.2.1.

Cannot install Craft from project config with a 'default' calendar

When deploying a site for the first time with craft install and using project config, an error is generated suggesting that the 'default' calendar already exists. I'm guessing that this calendar is created as part of the installation, then project-config comes along and tries to create it again.

A couple of experiments shows that a workaround presents other problems - I changed the 'default' handle in dev to something else, which allows the installation to complete with the pre-configured calendar from project config. However, the plugin still insists on creating a 'default' calendar during craft install in production (even though one no longer exists in dev) and therefore modifies project config on what is a production environment.

Here's a snippet from the logs:

> applying existing project config ... Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'default' for key 'handle'
The SQL being executed was: 
INSERT INTO `calendar_calendars` (`uid`, `name`, `handle`, `description`, `color`, `descriptionFieldHandle`, `locationFieldHandle`, `icsHash`, `icsTimezone`, `titleFormat`, `titleLabel`, `hasTitleField`, `allowRepeatingEvents`, `fieldLayoutId`, `dateCreated`, `dateUpdated`) 
VALUES ('019e3025-be7a-432c-9188-c465020d97eb', 'Default', 'default', 'The default calendar', '#023F58', '0', '0', NULL, 'floating', '', 'Title', 1, 1, 1, '2021-07-15 16:06:54', '2021-07-15 16:06:54') 
(/home/aadaorg/public_html/vendor/yiisoft/yii2/db/Schema.php:678)

Steps to reproduce

  1. Deploy a git repository of a Craft site which contains a single, pre-configured Calendar with the handle 'default'
  2. Run ./craft install

Craft & Plugin Info

  • Craft Version: 3.7.0
  • Calendar Version: 3.3.2
  • Calendar Edition: Lite
  • Fresh Install or Upgrade: Fresh install of Craft with PC.

YAML from project config:

allowRepeatingEvents: true
color: '#023F58'
description: 'The default calendar'
descriptionFieldHandle: '0'
fieldLayout:
  tabs:
    -
      elements:
        -
          fieldUid: 3881eeff-1f46-4329-a193-0ccd0711348b # Featured image
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          fieldUid: 73958d86-d825-444f-8b4f-89de8224e76c # Summary image
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          fieldUid: f3662c0e-a479-4626-b5dc-dfeed990629e # Intro text
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 100
        -
          fieldUid: e0efe2d2-bc06-4c02-9778-3639b4b699c9 # Venue
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          fieldUid: 9e268147-2302-4125-af91-e69c300a0cb8 # Price
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          fieldUid: 4976fa92-3408-415e-84d0-deec9a3e2ec4 # Description
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 100
        -
          type: craft\fieldlayoutelements\HorizontalRule
        -
          fieldUid: 5aba0f41-8bbb-43bb-9205-55585b91ca29 # Website
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          fieldUid: a599f193-fe3b-49d1-8351-5ef871c97ab8 # Booking link
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          type: craft\fieldlayoutelements\HorizontalRule
        -
          fieldUid: b786d9d9-1009-4da9-9763-d0f83c1dfc3e # Contact email
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          fieldUid: 7c3a5c79-3985-4ee4-a035-8638f862c60d # Contact telephone
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          fieldUid: c0713327-146a-4571-b192-eb19bc5caa52 # Organiser
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
        -
          fieldUid: 1082e1c8-1c15-4f25-a683-e5fcc2120ffd # Organiser website
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 50
      name: Details
      sortOrder: 1
    -
      elements:
        -
          fieldUid: 7a2d636a-d371-41fd-9a55-ecbe51ad518c # SEO
          instructions: null
          label: null
          required: false
          tip: null
          type: craft\fieldlayoutelements\CustomField
          warning: null
          width: 100
      name: Meta
      sortOrder: 2
  uid: 33eaad16-a22b-48f2-8ff0-bd099eef7f92
handle: default
hasTitleField: true
icsHash: null
icsTimezone: floating
locationFieldHandle: '0'
name: Default
siteSettings:
  d32dfeff-4b5a-4f75-839c-62d31058793b:
    enabledByDefault: true
    hasUrls: true
    siteId: 5ce0eb20-760e-42c2-8576-640f55aee930 # AADA
    template: events/_entry
    uriFormat: 'event/{slug}'
titleFormat: ''
titleLabel: Title

Efficient event queries

Congratulations for releasing the beta!

I've looked into the EventQuery class and currently don't know how to efficiently query for events within a certain range. Maybe I'm missing something?

The methods EventQuery::setStartDate, EventQuery::setEndDate and EventQuery::setUntil don't allow to pass an operator as the passed argument is instantly converted to a DateTime/Carbon instance, hence any prepended operators produce an error. In EventQuery::beforePrepare the values are passed to Db::parseParam which would inject operators, but I don't see no way to pass them here.

The opposite of EventQuery::setUntil is missing, shouldn't there be something like EventQuery::setFrom?

Currently we can use EventQuery::setRangeStart and EventQuery::setRangeEnd to query a certain date range, but there seems to be no preselecting of events in EventQuery::beforePrepare going on. So as far as I understand the code, the entire calendar will be loaded when using rangeStart or rangeEnd and the events will be filtered by code?

EventsService::EVENT_AFTER_SAVE does not fire after saving element via slideout

Describe the bug or issue you're experiencing

EventsService::EVENT_AFTER_SAVE does not fire after saving element via slideout

Steps to reproduce

  1. Add some code subscribing to EventsService::EVENT_AFTER_SAVE event as described in the docs
  2. Create a custom Calendar Events field and and add it to an entry type
  3. Create/edit an entry and select an event
  4. Double-click on the selected event
  5. Make changes and press Save

Expected behavior

Subscription should fire.

Craft & Plugin Info:

  • Craft Version: 3.7.23
  • Calendar Version: 3.3.7
  • Calendar Edition: PRO
  • Fresh Install or Upgrade: Upgrade

Additional context

I think this is related to #86 because it's also tied to code that is only fired in the calendar event controller, but not in Craft's elements/save-element action.

Ideally I'd prefer to use the existing Element events, but I'm not sure if there is a reason your plugin provides it's own event? i.e.:

use Solspace\Calendar\Elements\Event as EventElement;

Event::on(EventElement::class, EventElement::EVENT_AFTER_SAVE, function (ModelEvent $e) {
  /* @var $event EventElement*/
  $event = $e->sender;

Date translation

The dates can't be translated with the | t filter. I'm trying to translate something like this card.endDate.format('l, j. F Y') from en to de.

Event queries

This is a follow up issue regarding #4. Thanks for the update, I can see you've added some additional queries to the EventQuery::beforePrepare method.

However, using rangeStart and rangeEnd does not consider events that spawn multiple days. E.g. when specifying rangeStart as today, an event that has started yesterday and will last till tomorrow is excluded as the condition startDate >= :rangeStart (https://github.com/solspace/craft3-calendar/blob/master/src/Elements/Db/EventQuery.php#L494) is not met. Shouldn't the check be something like endDate >= :rangeStart? Again, it would be great if we could use custom operators to bypass this problems.

Also I wanted to note that the filtering of events using rrules looks suspicious to me. You ignore startDate if a rrule is present but on the endDate there is no such check. But even if an event has an rrule isn't its startDate always present but the endDate may vary? Furthermore, isn't the field until used to store the end date of the rrule result, so shouldn't that be used?

Base table or view not found

I'm in the process of updating a Craft 2 site to Craft 3, and the Calendar migration appeared to go ok. But, when I click into the default calendar (admin/calendar/calendars/default), I get the following error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hamilton.craft_calendar_calendar_sites' doesn't exist in /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Command.php:1258
Stack trace:
#0 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Command.php(1258): PDOStatement->execute()
#1 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Command.php(1148): yii\db\Command->internalExecute('SELECT `calenda...')
#2 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Query.php(237): yii\db\Command->queryAll()
#4 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/db/Query.php(136): yii\db\Query->all(NULL)
#5 /Users/tdavis/sites/hamilton/vendor/solspace/craft3-calendar/src/Services/CalendarsService.php(492): craft\db\Query->all()
#6 /Users/tdavis/sites/hamilton/vendor/solspace/craft3-calendar/src/Models/CalendarModel.php(206): Solspace\Calendar\Services\CalendarsService->getCalendarSiteSettings(1)
#7 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/Component.php(139): Solspace\Calendar\Models\CalendarModel->getSiteSettings()
#8 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/helpers/Template.php(57): yii\base\Component->__get('siteSettings')
#9 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/d9/d9dda4c74551f8dcbf0fac29a94f3eb4c3a18581df2dca4f04ea3fa61cb913db.php(237): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(Solspace\Calendar\Models\CalendarModel), 'siteSettings', Array, 'any', false, true)
#10 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(193): __TwigTemplate_1e2774c89afa85b68e5966c7dc56d19dc62868f3f49d9fe7a13210d3f22e798a->block_content(Array, Array)
#11 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/ac/acaf91c01bbdd47d489bf203f2d2aa5aef9f5236a8c08bb01fa8cdf3e3f7950c.php(640): Twig_Template->displayBlock('content', Array, Array)
#12 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(193): __TwigTemplate_4f505b1097cc18aa79166d11f2159214fa02d3fa387b119e9ccb9b98aec847c8->block_main(Array, Array)
#13 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/ac/acaf91c01bbdd47d489bf203f2d2aa5aef9f5236a8c08bb01fa8cdf3e3f7950c.php(537): Twig_Template->displayBlock('main', Array, Array)
#14 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(193): __TwigTemplate_4f505b1097cc18aa79166d11f2159214fa02d3fa387b119e9ccb9b98aec847c8->block_body(Array, Array)
#15 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/1a/1aaed9238a2def70862e1e040bdacc7634d7c6f059d8144e79ec3b10199e04d1.php(57): Twig_Template->displayBlock('body', Array, Array)
#16 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_d8142c816efa9a18ab6c3833b6c6be3042aaae6ee9769a6114f47b1f272844fb->doDisplay(Array, Array)
#17 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#18 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#19 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#20 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/8a/8aee160cea6c4f13916e091e6cef57dcf11f6b7fcbc031768341a0f612d1787d.php(40): craft\web\twig\Template->display(Array, Array)
#21 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_88bd80751573a94483f64fc2dcc00d29da8ffa5aab16102d83e739a2e477b888->doDisplay(Array, Array)
#22 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#23 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#24 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#25 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/ac/acaf91c01bbdd47d489bf203f2d2aa5aef9f5236a8c08bb01fa8cdf3e3f7950c.php(94): craft\web\twig\Template->display(Array, Array)
#26 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_4f505b1097cc18aa79166d11f2159214fa02d3fa387b119e9ccb9b98aec847c8->doDisplay(Array, Array)
#27 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#28 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#29 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#30 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/a7/a708d374947e9a2cb9ed3f728b0b44e69ee3d26a82890e402a05abca6a89e439.php(31): craft\web\twig\Template->display(Array, Array)
#31 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_48d73abfa21a635f3611ed7ddcf0d384f6dc5dc9a3d4e2c9a74dbe3472830f88->doDisplay(Array, Array)
#32 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#33 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#34 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#35 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/d9/d9dda4c74551f8dcbf0fac29a94f3eb4c3a18581df2dca4f04ea3fa61cb913db.php(104): craft\web\twig\Template->display(Array, Array)
#36 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_1e2774c89afa85b68e5966c7dc56d19dc62868f3f49d9fe7a13210d3f22e798a->doDisplay(Array, Array)
#37 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#38 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#39 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#40 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(379): craft\web\twig\Template->display(Array)
#41 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Environment.php(289): Twig_Template->render(Array)
#42 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/View.php(305): Twig_Environment->render('calendar/calend...', Array)
#43 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/View.php(352): craft\web\View->renderTemplate('calendar/calend...', Array)
#44 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/Controller.php(113): craft\web\View->renderPageTemplate('calendar/calend...', Array)
#45 /Users/tdavis/sites/hamilton/vendor/solspace/craft3-calendar/src/Controllers/CalendarsController.php(287): craft\web\Controller->renderTemplate('calendar/calend...', Array)
#46 /Users/tdavis/sites/hamilton/vendor/solspace/craft3-calendar/src/Controllers/CalendarsController.php(74): Solspace\Calendar\Controllers\CalendarsController->renderEditTemplate(Object(Solspace\Calendar\Models\CalendarModel), 'Default')
#47 [internal function]: Solspace\Calendar\Controllers\CalendarsController->actionEditCalendar('default')
#48 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#49 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#50 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/Controller.php(74): yii\base\Controller->runAction('edit-calendar', Array)
#51 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('edit-calendar', Array)
#52 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/Application.php(237): yii\base\Module->runAction('calendar/calend...', Array)
#53 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('calendar/calend...', Array)
#54 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/Application.php(226): yii\web\Application->handleRequest(Object(craft\web\Request))
#55 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#56 /Users/tdavis/sites/hamilton/public/index.php(21): yii\base\Application->run()
#57 {main}

Next yii\db\Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hamilton.craft_calendar_calendar_sites' doesn't exist
The SQL being executed was: SELECT `calendar_calendar_sites`.`id`, `calendar_calendar_sites`.`calendarId`, `calendar_calendar_sites`.`siteId`, `calendar_calendar_sites`.`enabledByDefault`, `calendar_calendar_sites`.`hasUrls`, `calendar_calendar_sites`.`uriFormat`, `calendar_calendar_sites`.`template`
FROM `craft_calendar_calendar_sites` `calendar_calendar_sites`
INNER JOIN `craft_sites` `sites` ON `sites`.`id` = `calendar_calendar_sites`.`siteId`
WHERE `calendar_calendar_sites`.`calendarId`=1
ORDER BY `sites`.`sortOrder` in /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Schema.php:664
Stack trace:
#0 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Command.php(1263): yii\db\Schema->convertException(Object(PDOException), 'SELECT `calenda...')
#1 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Command.php(1148): yii\db\Command->internalExecute('SELECT `calenda...')
#2 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/db/Query.php(237): yii\db\Command->queryAll()
#4 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/db/Query.php(136): yii\db\Query->all(NULL)
#5 /Users/tdavis/sites/hamilton/vendor/solspace/craft3-calendar/src/Services/CalendarsService.php(492): craft\db\Query->all()
#6 /Users/tdavis/sites/hamilton/vendor/solspace/craft3-calendar/src/Models/CalendarModel.php(206): Solspace\Calendar\Services\CalendarsService->getCalendarSiteSettings(1)
#7 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/Component.php(139): Solspace\Calendar\Models\CalendarModel->getSiteSettings()
#8 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/helpers/Template.php(57): yii\base\Component->__get('siteSettings')
#9 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/d9/d9dda4c74551f8dcbf0fac29a94f3eb4c3a18581df2dca4f04ea3fa61cb913db.php(237): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(Solspace\Calendar\Models\CalendarModel), 'siteSettings', Array, 'any', false, true)
#10 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(193): __TwigTemplate_1e2774c89afa85b68e5966c7dc56d19dc62868f3f49d9fe7a13210d3f22e798a->block_content(Array, Array)
#11 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/ac/acaf91c01bbdd47d489bf203f2d2aa5aef9f5236a8c08bb01fa8cdf3e3f7950c.php(640): Twig_Template->displayBlock('content', Array, Array)
#12 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(193): __TwigTemplate_4f505b1097cc18aa79166d11f2159214fa02d3fa387b119e9ccb9b98aec847c8->block_main(Array, Array)
#13 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/ac/acaf91c01bbdd47d489bf203f2d2aa5aef9f5236a8c08bb01fa8cdf3e3f7950c.php(537): Twig_Template->displayBlock('main', Array, Array)
#14 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(193): __TwigTemplate_4f505b1097cc18aa79166d11f2159214fa02d3fa387b119e9ccb9b98aec847c8->block_body(Array, Array)
#15 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/1a/1aaed9238a2def70862e1e040bdacc7634d7c6f059d8144e79ec3b10199e04d1.php(57): Twig_Template->displayBlock('body', Array, Array)
#16 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_d8142c816efa9a18ab6c3833b6c6be3042aaae6ee9769a6114f47b1f272844fb->doDisplay(Array, Array)
#17 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#18 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#19 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#20 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/8a/8aee160cea6c4f13916e091e6cef57dcf11f6b7fcbc031768341a0f612d1787d.php(40): craft\web\twig\Template->display(Array, Array)
#21 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_88bd80751573a94483f64fc2dcc00d29da8ffa5aab16102d83e739a2e477b888->doDisplay(Array, Array)
#22 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#23 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#24 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#25 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/ac/acaf91c01bbdd47d489bf203f2d2aa5aef9f5236a8c08bb01fa8cdf3e3f7950c.php(94): craft\web\twig\Template->display(Array, Array)
#26 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_4f505b1097cc18aa79166d11f2159214fa02d3fa387b119e9ccb9b98aec847c8->doDisplay(Array, Array)
#27 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#28 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#29 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#30 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/a7/a708d374947e9a2cb9ed3f728b0b44e69ee3d26a82890e402a05abca6a89e439.php(31): craft\web\twig\Template->display(Array, Array)
#31 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_48d73abfa21a635f3611ed7ddcf0d384f6dc5dc9a3d4e2c9a74dbe3472830f88->doDisplay(Array, Array)
#32 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#33 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#34 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#35 /Users/tdavis/sites/hamilton/storage/runtime/compiled_templates/d9/d9dda4c74551f8dcbf0fac29a94f3eb4c3a18581df2dca4f04ea3fa61cb913db.php(104): craft\web\twig\Template->display(Array, Array)
#36 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(394): __TwigTemplate_1e2774c89afa85b68e5966c7dc56d19dc62868f3f49d9fe7a13210d3f22e798a->doDisplay(Array, Array)
#37 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#38 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#39 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#40 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Template.php(379): craft\web\twig\Template->display(Array)
#41 /Users/tdavis/sites/hamilton/vendor/twig/twig/lib/Twig/Environment.php(289): Twig_Template->render(Array)
#42 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/View.php(305): Twig_Environment->render('calendar/calend...', Array)
#43 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/View.php(352): craft\web\View->renderTemplate('calendar/calend...', Array)
#44 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/Controller.php(113): craft\web\View->renderPageTemplate('calendar/calend...', Array)
#45 /Users/tdavis/sites/hamilton/vendor/solspace/craft3-calendar/src/Controllers/CalendarsController.php(287): craft\web\Controller->renderTemplate('calendar/calend...', Array)
#46 /Users/tdavis/sites/hamilton/vendor/solspace/craft3-calendar/src/Controllers/CalendarsController.php(74): Solspace\Calendar\Controllers\CalendarsController->renderEditTemplate(Object(Solspace\Calendar\Models\CalendarModel), 'Default')
#47 [internal function]: Solspace\Calendar\Controllers\CalendarsController->actionEditCalendar('default')
#48 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#49 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#50 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/Controller.php(74): yii\base\Controller->runAction('edit-calendar', Array)
#51 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('edit-calendar', Array)
#52 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/Application.php(237): yii\base\Module->runAction('calendar/calend...', Array)
#53 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('calendar/calend...', Array)
#54 /Users/tdavis/sites/hamilton/vendor/craftcms/cms/src/web/Application.php(226): yii\web\Application->handleRequest(Object(craft\web\Request))
#55 /Users/tdavis/sites/hamilton/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#56 /Users/tdavis/sites/hamilton/public/index.php(21): yii\base\Application->run()
#57 {main}
Additional Information:
Array
(
    [0] => 42S02
    [1] => 1146
    [2] => Table 'hamilton.craft_calendar_calendar_sites' doesn't exist
)

Event Save events are not fired during FeedMe import

I wrote a small module to hook into Event save events, which works fine when using the CP, but does not seem to fire/activate EVENT_AFTER_SAVE when FeedMe creates/updates an element. My goal is to be able to detect the same action (and isNew) in both cases.

Steps to reproduce

  1. Hook the EVENT_AFTER_SAVE in module/plugin
  2. Save an event manually; event is captured.
  3. Import an event through FeedMe, event is not captured. The FeedMe STEP event for save does not make the same element details available (including isNew) it seems either.

Expected behavior

Able to catch event save/update in the same fashion both ways.

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

  • Craft Version: Craft Solo 3.6.14
  • Calendar Version: dev-master (due to Rrule bug fix)
  • Calendar Edition: Standard (but Pro Trial activated...maybe because I trialed FreeForm?)
  • Fresh Install or Upgrade: Current install

Additional context

Using a Calendar Event input in an Entry Type then re-ordering the events resets the events to the original order after saving the entry.

Using a Calendar Event input in an Entry Type then re-ordering the events resets the events to the original order after saving the entry.

Steps to reproduce

  1. Create a Section with an Entry Type
  2. Create an input using the Solspace Calendar Events Input
  3. Add the input to the Section Entry Type
  4. Create an Entry add events to the Events Input
  5. After saving the entry try to reorder the events and save

Expected behavior
After reordering and saving the entry the events would stay in their reordered position.

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

  • Craft Version: Craft CMS 3.7.10
  • Calendar Version: 3.3.3
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Fresh Install

Additional context
Our Calendar Events input is within a Neo Input.

Select dates are not saved when editing via slideout

Describe the bug or issue you're experiencing

Editing an event using the slideout does not update the repeating dates for an event that repeats every "Select dates".

Steps to reproduce

  1. Create a custom Calendar Events field and and add it to an entry type
  2. Create/edit an entry and select an event
  3. Double-click on the selected event
  4. Make changes to the "Repeats" options so that it repeats every "Select dates" and specify some dates
  5. Press Save

image

Expected behavior

Event should be updated with the selected dates.

Craft & Plugin Info:

  • Craft Version: 3.7.23
  • Calendar Version: 3.3.7
  • Calendar Edition: PRO
  • Fresh Install or Upgrade: Upgrade

Additional context

I think maybe this happens because the slideout submits to Craft's elements/save-element action,
but the select dates are only saved in EventsController::actionSaveElement():

https://github.com/solspace/craft3-calendar/blob/d929c51c273495d12e007d3cb9e940ea8ade5393/packages/plugin/src/Controllers/EventsController.php#L265

Maybe this can be fixed by moving this logic to the Event element's afterSave method?

Is this plugin suposed to work with craft 3.5 and php 7.4?

I've updated craft and php version therefore pages with the calendar are not working. It throwing an exception when trying to use Nesbot getter date.

Carbon\Exceptions\UnknownGetterException: Unknown getter 'date' in /var/www/vendor/nesbot/carbon/src/Carbon/Traits/Date.php:1017

I will do further investigation to debug the issue and will post if I find anything here.

Pagination breaks event sorting

The /admin/calendar/events presents a table of calendar events which can be sorted alphabetically by title by clicking on the table header.

Pagination breaks this sort. Specifically, when you navigate to the 2nd page the results are no longer in alphabetical order (I believe they are in database order).

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

  • Craft Version: 3.7.13
  • Calendar Version: 3.3.4
  • Calendar Edition: Pro

Issue with events list when sorting by post date

Hi guys,

When using the events list

/admin/calendar/events

If you try to sort the events by postDate, this results in craft throwing 400 error:

Request must accept JSON in response

Thanks :)

Time is not matching timezone

Im using Europe/Brussels (UTC +2 CEST)

This is what shows on entry view:
screenshot 2018-04-30 11 39 19

This is what show on the overview
screenshot 2018-04-30 11 40 11

.format() gives me the right time but I need the |date filter because I want my months translated.
But when using |date it also adds 2 hours offset.

Custom Title format

Hey,
really sorry to bring this up again like this https://github.com/solspace/craft3-calendar/issues/3 but I've been in contact with you for a few weeks since I have a client meeting coming up in just two days now.

Is there any chance this particular feature will be fixed by then?

And am I correct in thinking that a Users field will be able to take the place of the Title field, thus effectively making usernames into event titles? Or won't that work regardless?

Month.(start)Date incorrect when using groupedByMonth()

Describe the bug or issue you're experiencing
I'm noticing that month.(start)Date is incorrect when using groupedByMonth()

Steps to reproduce

  1. Create an multi-day event spanning 2 months (for example: from dec 27th until jan 9th)
  2. Use following simplified template
{% set eventsGroupedByMonth = craft.calendar.events({
    ...
    rangeStart: 'today',
}).groupedByMonth() %}

{% for month in eventsGroupedByMonth %}
    <h2>{{ month.startDate|date('F') }}</h2>

    {% for event in month.events %}
        <h3>
            {{ event.startDate|date('d/m') }} - {{ event.endDateDate|date('d/m') }}
        </h3>
    {% endfor %}
{% endfor %}

Expected behavior

You would expect following output:

    <h2>december</h2>
        <h3>27/12 - 10/01</h3>
    <h2>january</h2>
        <h3>27/12 - 10/01</h3>

But get:

    <h2>december</h2>
        <h3>27/12 - 10/01</h3>
    <h2>december</h2>
        <h3>27/12 - 10/01</h3>

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

  • Craft Version: 3.7.20
  • Calendar Version: 3.3.7
  • Calendar Edition: Lite
  • Fresh Install or Upgrade: Fresh install

Additional context

I suspect it got something to do with line 584 in Elements/Db/EventQuery.php.
$grouped[] = new MonthDuration($firstEvent->getStartDate(), $events);

Where the $firstEvent->getStartDate() is dec 27th

Undefined class constant 'Client' after update to Craft 3.0.0 GA

In the latest version of Calendar (beta 8), an error is thrown due to Craft switching it edition types. I believe the types are now Solo and Pro. Client appears to have been removed.

To reproduce:

Download craft 3.0.0 (not RC versions) and calendar beta 8.

GraphQL: loadOcurrences on events displays everything even with limit set in calendar

I have an element on my website where I only need the first three events in a query. I didn't want to have to set an endRange on the event. When I use limit: 3 with loadOccurrences set to true, I get the next three events, but if the event is reoccurring, I get every recurrence of that event thereafter.

Conversely, if I have an event that repeats, the event reoccurs today or in the future, and the loadOccurrences option is set to false, then any event that is repeating will not show if the first date in the chain has already passed.

Here's my graphQL schema (this will load EVERY occurrence of a repeating event, even though I need 3 events total):

query calEvents($slugs: [String]) { solspace_calendar { calendar(handle: $slugs, limit: 3) { name handle events(rangeStart: "Today", loadOccurrences: true) { id title startDate @formatDateTime(format: "l, F jS, Y") endDate @formatDateTime(format: "l, F jS, Y") startTime: startDate @formatDateTime(format: "g:i A") endTime: endDate @formatDateTime(format: "g:i A") allDay multiDay freq ... on events_Event { id bannerImage { title url } } } } } }

Steps to reproduce

  1. Have a calendar with one or several repeating events
  2. run GraphQL in explorer above.

Expected behavior
I only want it to return 3 events, even if reoccurring events are set to show. Or, at least show upcoming events that are recurrent.

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

  • Craft Version: 3.7.11
  • Calendar Version: 3.3.3
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Fresh

Additional context
This is for a client who has daily repeating events, as well as fundraising events. I'd like to be able to show the next 3 upcoming events.

Resaving of entries

If I create a new calendar, and then make a change to this calendar's settings, this causes a re-save of any existing entries.

There appears to be an issue with the task which does this.

I'm getting the following error

description:"Resaving Public Calendar events (Site 1)"
error:"Getting unknown property: Solspace\Calendar\Elements\Event::"

Thanks :)

Dismissing the "Get calendar up and running" message on Project Config sites causes an error

Describe the bug or issue you're experiencing

On environments where administrative changes are disallowed, like staging and production on Project Config sites, the banner for installing the demo templates still appears. When you dismiss it, a server error occurs because this is stored in project config, but you can't edit that on staging/production.

Banner:
image

Clicking the X causes this error:

2021-03-19 01:45:37 [-][1][-][error][yii\web\HttpException:403] yii\web\ForbiddenHttpException: Administrative changes are disallowed in this environment. in /srv/users/app-name/apps/app-name/vendor/craftcms/cms/src/web/Controller.php:318

Expected behavior
Probably remove that banner entirely on environments where admin changes aren't allowed.

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

  • Craft Version: 3.6.10
  • Calendar Version: 3.2.1
  • Calendar Edition: Pro

Issue with database table prefix

Hi guys,

Great work on getting the beta released. I've had a chance to have a play and found a couple of small issues.

My craft install has a "craft_" table prefix and this looks to have caused a couple of issues.

I've been able to apply a couple of hotfixes to the following files -

solspace/craft3-calendar/src/elementtypes/Calendar_EventElementType.php:284
solspace/craft3-calendar/src/Library/DatabaseHelper.php:36
solspace/craft3-calendar/src/Records/CalendarRecord.php:26
solspace/craft3-calendar/src/Services/CalendarsService.php:475

Thanks :)

GraphQL query for future events does not work

First of all I'm very happy that you introduced the new GraphQL feature! comes at the perfect timing for an upcoming launch.

Unfortunatelty I am unable to query for future events only.

Steps to reproduce

  1. Query by entries shows all entries starting the beginning of the calendard
{
  solspace_calendar {
    version
    calendar {
      id
      events {
        id
        startDate
      }
    }
  }
}

results in a list of entries:

{
  "data": {
    "solspace_calendar": {
      "version": "3.3.0",
      "calendar": {
        "id": 1,
        "events": [
          {
            "id": 64,
            "startDate": "2020-05-03T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2020-06-07T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2020-07-05T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2020-08-02T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2020-09-06T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2020-10-04T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2020-11-01T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2020-12-06T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-01-03T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-02-07T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-03-07T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-04-04T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-05-02T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-06-06T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-07-04T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-08-01T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-09-05T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-10-03T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-11-07T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2021-12-05T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-01-02T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-02-06T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-03-06T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-04-03T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-05-01T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-06-05T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-07-03T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-08-07T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-09-04T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-10-02T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-11-06T00:00:00+00:00"
          },
          {
            "id": 64,
            "startDate": "2022-12-04T00:00:00+00:00"
          }
        ]
      }
    }
  }
}
  1. But querying with events(startsAfter:"now") results in an empty array:
{
  solspace_calendar {
    version
    calendar {
      id
      events(startsAfter:"now") {
        id
        startDate
      }
    }
  }
}

Result:

{
  "data": {
    "solspace_calendar": {
      "version": "3.3.0",
      "calendar": {
        "id": 1,
        "events": []
      }
    }
  }
}

I also tested with events(startsAfter:"2021-05-28T00:00:00+00:00") and events(startsAfter:"2021-05-28") with same result.

Expected behavior

Extected result would be a list of events starting after today.

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

  • Craft Version: 3.6.15
  • Calendar Version: 3.3.0
  • Fresh Install or Upgrade: Upgrade

Additional context

  • Running locally with Nitro 2.0.8

Issue with calendar.entries using calendar handle

Hi guys,

If I try to get events using a calendar handle:

{% set featuredEvents = craft.calendar.events({ calendar: 'public', search: 'eventsFeatureOnHomepage:1'}).all() %}

I get an SQL error

The SQL being executed was: SELECT 'elements'.'id'
FROM (SELECT 'elements'.'id' AS 'elementsId', 'elements_sites'.'id' AS 'elementsSitesId', 'content'.'id' AS 'contentId'
FROM 'craft_elements' 'elements'
INNER JOIN 'craft_calendar_events' 'calendar_events' ON 'calendar_events'.'id' = 'elements'.'id'
INNER JOIN 'craft_elements_sites' 'elements_sites' ON 'elements_sites'.'elementId' = 'elements'.'id'
INNER JOIN 'craft_content' 'content' ON 'content'.'elementId' = 'elements'.'id'
WHERE ('craft_calendar_calendars'.'handle' = 'public') AND ('elements_sites'.'siteId'='1') AND ('content'.'siteId'='1') AND ('elements'.'archived'=FALSE) AND ('elements_sites'.'enabled'=TRUE)) 'subquery'
INNER JOIN 'craft_calendar_events' 'calendar_events' ON 'calendar_events'.'id' = 'subquery'.'elementsId'
INNER JOIN 'craft_elements' 'elements' ON 'elements'.'id' = 'subquery'.'elementsId'
INNER JOIN 'craft_elements_sites' 'elements_sites' ON 'elements_sites'.'id' = 'subquery'.'elementsSitesId'
INNER JOIN 'craft_content' 'content' ON 'content'.'id' = 'subquery'.'contentId'

The same query using the calendar ID is fine.

{% set featuredEvents = craft.calendar.events({ calendarId: 1, search: 'eventsFeatureOnHomepage:1'}).all() %}

It looks like there might be a missing join in the SQL above.

Thanks :)

Order of related events

What is the order of the events of the relationship field?

It seems you can drag and drop but after save it is reverted to, what seems to be, ordered on start date.

And this doesn't reflect in the template
production.relatedEvents.ids

This returns a different order than what the fieldtype visually shows.

So is the drag and drop broken? And why are the ids in a different order (would be nice if it was in the same order, so we don't have to fetch them with the calendar.events tag just for reordering).

Project YAML changes do not apply in correct order.

We made changes to the fields assigned to a calendar in our development environment. This caused project.yaml changes as we expected. When we deployed this to staging, the project.yaml was applied without error, but the field changes we made were not applied to the calendar.

I was able to confirm that the changes were included in the project yaml by reapplying the project.yaml a second time.

From looking at the log from the initial deploy, I believe the problem is an order of operations issue. Specifically, the changes to the calendar field assignments were run before the creation of the fields itself. This would explain why applying the changes a second time would fix the issue, since the fields would have been created at the end of the previous run.

Applying changes from your project config files ...
- removing solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.0.elements.3 ... 
  - updating solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97 ... done
  done
- removing solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.0.elements.4 ... done
- updating solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.1.elements.1 ... done
- updating solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.1.elements.0 ... done
- updating meta.__names__ ... done
- updating fields.2f71fcb3-ed0c-4398-adfb-4f48d15cad6c ... 
  - adding fieldGroups.c3bbc6bb-7be5-4119-ab8a-1de448dee2b2 ... done
  done
- updating fields.61eeaa19-ae63-4b5e-a333-7d334fa57191 ... done
- updating dateModified ... done
- adding solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.1.elements.2 ... done
- adding solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.1.elements.3 ... done
- adding solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.1.elements.4 ... done
- adding solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.1.elements.5 ... done
- adding solspace.calendar.calendars.729db07f-e3c2-455d-b1d1-3d90de128e97.fieldLayout.tabs.1.elements.6 ... done
- adding fields.630267b6-6e10-4eaf-904b-4f2659e3af33.settings ... 
  - adding fields.630267b6-6e10-4eaf-904b-4f2659e3af33 ... done
  done
- adding fields.5b87aede-b23f-48ad-874a-c051b811adce.settings ... 
  - adding fields.5b87aede-b23f-48ad-874a-c051b811adce ... done
  done

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

  • Craft Version: 3.7.13
  • Calendar Version: 3.3.4
  • Calendar Edition: Pro

SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "calendarsites"

Describe the bug or issue you're experiencing

On upgrading Calendar from 3.2.1 to 3.3.0 on Craft 3.6.17 Postgres database throws the error:

SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "calendarsites"
The SQL being executed was: SELECT calendarSites."id", calendarSites."uid", calendarSites."calendarId", calendarSites."siteId", calendarSites."enabledByDefault", calendarSites."hasUrls", calendarSites."uriFormat", calendarSites."template"
FROM "calendar_calendar_sites" "calendarSites" WHERE "calendarId"=1
ORDER BY "id"

The issue is caused by the camelCase definition of 'calendarSites' used in the getQuery() function of packages/plugin/src/Services/CalendarSitesService.php which Postgres is changing to lowercase and which then does not get recognised within the query. This is using Postgres 10.4, I am unsure if the failure to accept the camelCase is ultimately due to using an older Postgres version.

Steps to reproduce

  1. Build a craft install with multi site set up
  2. Install Calendar 3.2.1
  3. Add test calendar and event
  4. update to Calendar 3.3.0 or later
  5. Visit calendar settings in admin panel
  6. See error

Expected behavior

No errors would show. The calendar section of the admin panel, and calendar event pages within the multi site will display.

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

  • Craft Version: 3.6.17
  • Calendar Version: 3.3.0
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Upgrade

Additional context

I have tested changing the references in the getQuery() function to 'calendarsites' and this has resolved the issue for me. Attached is a PDF of the error in full.
calendar-error.pdf

Lots of duplicate events created

Describe the bug or issue you're experiencing
Client has around 4.5k events running back to 1989, they use the old events as a source of data for a timeline feature. Recently they noticed performance lags on searching for events and happened to notice that their events total jumped from 4.5k to over 26k. I investigated and found older events had duplicates created, sometimes up to 6 duplicates per event. This seems to happen on events 12/2018 and older. This doesn't happen on new events created.

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

  • Craft Version: 3.6.14
  • Calendar Version: 3.3.1
  • Calendar Edition: Lite
  • Fresh Install or Upgrade: Upgrade

Additional context

I'm happy to provide a login to the production instance and/or DB export.

EventsService calling site instead of siteId

Hi guys,

When calling craft.calendar.event() variable, if you include site or siteId in the options, this correctly works out the siteId however once this gets called in EventsService.php, it's calling "site" instead of "siteId" in the query.

solspace/craft3-calendar/src/Services/EventsService.php:56

This appears to fix the problem.

    {
        return Event::find()
            ->slug($slug)
            ->setAllowedCalendarsOnly(false)
            ->enabledForSite(false)
            // HOTFIX
            //->site($site)
            ->siteId($site)
            ->one();
    }

Thanks :)

Issue setting the calendar event template urls and template paths

When creating or editing a calendar's settings, the section for:

Site Settings
Choose which sites this calendar should be available in, and configure the site-specific settings.

This doesn't appear to set up the routing correctly. The urls for the events are set correctly however the routing to the template doesn't appear to work. It throws a regular 404.

HTTP 404 – Not Found – yii\web\NotFoundHttpException

Thanks :)

Poor performance on month view with lots of events

Describe the bug or issue you're experiencing
When loading the month view with lots of events (e.g. 290 records) it becomes very sluggish.
It takes about 4 seconds for the XHR to load.

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

  • Craft Version: Craft Pro 3.6.13
  • Calendar Version: 3.2.1
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: x

GraphQL : Allow filter of events by language/site

There seems to be a limitation regarding the querying of events via GraphQL. There is no way to determine which site/siteID should be used for the query. This results in the events always being in the default language of the project.

As I couldn't find anything in the documentation:
How can I filter events in GraphQL for a specific language/site?

…and a more advanced requirement is: i need to get all event-urls for all sites as a list. See GQL Query below:

query GetAllRoutes {
  solspace_calendar {
    events(loadOccurrences:false ) {
      id
      url
      __typename
      title
      calendarId
    }
  }
  entries(site: ["*"], uri: ":notempty:") {
      id
      siteId
      url
      __typename
      language
      title
  }
}

Calendar events in the control panel taking 30 seconds to load

Describe the bug or issue you're experiencing
When visiting the /admin/calendar route in the control panel, the XHR that fetches the events for the month view is taking 30 seconds or more to complete.

Steps to reproduce

  1. Go to the Calendar page in the control panel.

Expected behavior
The Calendar page should load faster.

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

  • Craft Version: Craft CMS 3.7.17.2
  • Calendar Version: Calendar 3.3.5
  • Calendar Edition: Pro
  • Fresh Install or Upgrade:

Additional context
Also, navigation between months takes a similarly long time to complete. There is only one calendar, events do make use of custom fields. They also have some recurring events.

Is there anything that can be down to bring this load time down or debug this?

Repeating events not showing up

Describe the bug or issue you're experiencing

I have birthdays in the calendar, which i have set as yearly repeating events all day. They do only show up in the calendar on the birthdate it self, not in other years.

Steps to reproduce

  1. Add an event, repeating yearly and all day without end date.
  2. Look into next year

Expected behavior

Events showing up every year

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

  • Craft Version: 3.7.13
  • Calendar Version: 3.3.5
  • Calendar Edition: Pro
  • Fresh Install or Upgrade: Fresh

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.