You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug or issue you're experiencing
When using a ->batch() event element query, reoccurring events are not returned.
When using ->all() the reoccurring events are returned.
Steps to reproduce
$all = Event::find()->setLoadOccurrences(true)->count();
// Dump event count not using batch
dump($all);
$batch = Event::find()->setLoadOccurrences(true)->batch(25);
$count = 0;
foreach ($batch as $key => $events) {
$count += count($events);
}
// Dump all events using batch
dd($count);
Expected behavior
The events returned using a ->batch() query should include reoccurring events.
Craft & Plugin Info (please complete the following information):
Craft Version: 4.5.6.1
Calendar Version: 4.0.9
Calendar Edition: Pro
Fresh Install or Upgrade: Fresh Install
Additional context
The "studioespresso/craft-scout" plugin uses batch to query for indexing. This is where we first noticed the issue.
The text was updated successfully, but these errors were encountered:
$query = \Solspace\Calendar\Elements\Event::find()->setLoadOccurrences(true);
$count = 0;
foreach ($query->batch(25) as $batch) {
$count =+ count($batch);
foreach ($batch as $event) {
// Do something with $event;
// dd($event); // Prints out Solspace\Calendar\Elements\Event object for me.
}
}
dd($count); // Prints out 4 for me.
I will investigate why recurring events are not returning.
Describe the bug or issue you're experiencing
When using a
->batch()
event element query, reoccurring events are not returned.When using
->all()
the reoccurring events are returned.Steps to reproduce
Expected behavior
The events returned using a
->batch()
query should include reoccurring events.Craft & Plugin Info (please complete the following information):
Additional context
The "studioespresso/craft-scout" plugin uses batch to query for indexing. This is where we first noticed the issue.
The text was updated successfully, but these errors were encountered: