solspace / craft-calendar Goto Github PK
View Code? Open in Web Editor NEWCalendar for Craft: The most reliable and powerful event management plugin for Craft.
Home Page: http://docs.solspace.com/craft/calendar/v5
License: Other
Calendar for Craft: The most reliable and powerful event management plugin for Craft.
Home Page: http://docs.solspace.com/craft/calendar/v5
License: Other
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
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):
Additional context
Happens on local environment and on the server hosting the live site.
We have a craft install setup with 5 sites, but there is only one calendar, which is only enabled for one site.
When you view the events index, admin/calendar/events
, it shows multiple sites in the dropdown.
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
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
Expected behavior
Expect to see UID in project config
Craft & Plugin Info (please complete the following information):
Additional context
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
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):
Additional context
In devMode
this isn't a problem. It's only reproducible when devMode
is disabled.
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
Expected behavior
Download ICS file containing event location without errors.
Craft & Plugin Info (please complete the following information):
Additional context
Maps plugin 3.9.2 Lite edition
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!
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
'End repeat' => 'Fin de la répétition',
'Except on' => 'Excepté le',
Expected behavior
The text should be translated
Craft & Plugin Info :
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.
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
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):
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.
Steps to reproduce
Expected behavior
It would be great if all event fields were editable from the slideout.
Craft & Plugin Info:
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 :)
Got an error when i try to add a supertable field into an event
Calling unknown method: verbb\supertable\elements\db\SuperTableBlockQuery::hasTitleField()
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
{% set eventsGroupedByMonth = craft.calendar.events({
calendar: 'classes',
relatedTo: entry
}).groupedByMonth() %}
Expected behavior
Silently failing
Craft & Plugin Info (please complete the following information):
Additional context
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
composer.json
composer update
./craft migrate/all
Expected behavior
No errors after running ./craft migrate/all
.
Craft & Plugin Info (please complete the following information):
Additional context
Update: In the meantime, I successfully updated to 3.2.1.
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
Craft & Plugin Info
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
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?
Describe the bug or issue you're experiencing
EventsService::EVENT_AFTER_SAVE
does not fire after saving element via slideout
Steps to reproduce
EventsService::EVENT_AFTER_SAVE
event as described in the docsExpected behavior
Subscription should fire.
Craft & Plugin Info:
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;
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.
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?
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
)
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
Expected behavior
Able to catch event save/update in the same fashion both ways.
Craft & Plugin Info (please complete the following information):
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.
Steps to reproduce
Expected behavior
After reordering and saving the entry the events would stay in their reordered position.
Craft & Plugin Info (please complete the following information):
Additional context
Our Calendar Events input is within a Neo Input.
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
Expected behavior
Event should be updated with the selected dates.
Craft & Plugin Info:
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()
:
Maybe this can be fixed by moving this logic to the Event
element's afterSave
method?
I'm getting an error when fetching events with dateRangeStart.
{% set events = craft.calendar.events({
id: events,
order: 'startDate',
loadOccurrences: false,
dateRangeStart: now
}) %}
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.
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):
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 :)
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?
Describe the bug or issue you're experiencing
I'm noticing that month.(start)Date is incorrect when using groupedByMonth()
Steps to reproduce
{% 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):
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
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.
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
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):
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.
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 :)
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.
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):
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 :)
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
{
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"
}
]
}
}
}
}
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):
Additional context
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 :)
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).
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):
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
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):
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
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):
Additional context
I'm happy to provide a login to the production instance and/or DB export.
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 :)
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 :)
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):
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
}
}
The repository contains translations right here: https://github.com/solspace/craft3-calendar/tree/master/src/translations. However, in Craft 3 the path schema for translation files has changed (see https://github.com/craftcms/docs/blob/v3/en/changes-in-craft-3.md#static-translation-files), so currently they are not loaded/used.
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
Expected behavior
The Calendar page should load faster.
Craft & Plugin Info (please complete the following information):
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?
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
Expected behavior
Events showing up every year
Craft & Plugin Info (please complete the following information):
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.