Closed Kahmoon closed 3 years ago
Hey, can you send me your database SQL dump over the e-mail? You already know it 😉
You already know it 😉
?? Yo mean this come from latest changes? Its not since the latest changes but maybe this made it a bit worse.
Actually there are round about 20 calendar archives für different. Probably the query goes over every archive.
I will send a dump
By "it" I meant my e-mail address, sorry.
Haha OK. E-mail should be there already
I removed some old archives ( < 2019 ) but still 23 left. Every archive contains round about 60-80 events. Just "Alle Kurse" contains 769 and "Prüfungsvorbereitung" 598, which most of them are offline.
I have found the biggest bottleneck, please update the extension to 2.13.2 and the performance should be better.
Performance went super up…but also the preview of subscribers is 0 now.
$this->subscribers does not exist anymore. Also $this->subscriptionMaximum
event_upcoming template
<div class="event layout_upcoming subscriptions <?= $this->classUpcoming ?><?php if (count($cssClasses) > 0): ?> <?= implode(' ', $cssClasses); endif; ?>">
<time datetime="<?= $this->datetime ?>" class="date" itemprop="startDate">
<i class="fas fa-calendar-check <?= $this->classUpcoming ?>"></i> <?= $this->date ?><?php if ($this->time): ?> <span class="">(<?= $this->time ?> Uhr)</span><?php endif; ?>
<?php if($this->subscribers['subscriptionMaximum'] != 999) :?>
<span class="subscribers_status_upcoming primary" title="<?php if(strstr($this->classUpcoming,'can-subscribe')): ?>Anmeldung für diesen Termin möglich.<?php else: ?>Keine Anmeldung für diesen Termin möglich.<?php endif; ?>">({{fa::user}} <?php if($this->subscribers['subscribersParticipants'] > 0):?><?= $this->subscribers['subscribersParticipants'] ?><?php else:?>0<?php endif; ?>/<?php if($this->subscriptionMaximum != 0): ?><?= $this->subscriptionMaximum ?><?php else: ?>∞<?php endif; ?>):</span>
<?php endif; ?>
<span class="d-sm-none d-xs-inline">
<?php if(strstr($this->classUpcoming,'subscribed')): ?>
{{fa::star}}
<?php endif; ?>
</span>
</time>
<a class="d-block d-lg-inline" href="<?= $this->href ?>" title="<?= $this->title ?> (<?php if ($this->day) echo $this->day . ', '; ?><?= $this->date ?><?php if ($this->time) echo ', ' . $this->time;?> Uhr)"<?= $this->target ?> itemprop="url"><?= $this->link ?></a>
<span class="d-none d-sm-inline">
<?php if(strstr($this->classUpcoming,'subscribed')): ?>
{{fa::star}}
<?php endif; ?>
</span>
</div>```
I forgot that you also use other calendar extensions, please try updating to 2.13.3.
Thanks. Problem is fixed in cal_default but not event_upcoming template
Variables used in event_upcoming template see post above. https://github.com/codefog/contao-events_subscriptions/issues/76#issuecomment-942172002
What module type is that? Event list?
yes. it worked before 2.13.2
It did work before, because it used the getAllEvents
hook to add the data to the event, but that solution fails due to performance issues. And it would still work, if you wouldn't have the https://packagist.org/packages/kmielke/calendar-extended-bundle installed in your system, which overrides the event list module.
I will send you your updated custom module soon via e-mail.
I´m not sure if i need this module mandatory. I will check
Just a little update: after changes in this commit, the fact that kmielke/calendar-extended-bundle
overrides the core module is irrelevant. The subscribers data won't be available in core modules either. To get the subscribers data inside the events module, please use the Event list subscribe
and Event reader subscribe
modules.
So it would be no problem anyways?
I just tried in dev system and it seems that we don´t need this extension anyway
Edit: I removed this extension. We used a single field....thats not woth a complete extension
Your new listing module is fine. Performance too. Thanks a lot!
Hi Kamil,
can we boost "my subscriptions" in any way? For a casual student with not that many events subscribed (in this case 36 events from 3 archives) the page is loading 8-10 seconds which is insanely long :-(. He will probably subscribe to round about 20 more. Maybe some kind of caching!?