This commit fixes the current talk test.
Now they're passing, I'll review the tests themselves and refactor them
and/or the implementation code as needed.
Sort the talks on the listing page solely by `field_event_date`.
Prior to this commit, the page was using a custom sort plugin that
attempts to show future talks followed by past talks, but also affect
the order to show upcoming talks in an ascending order, followed by past
dalks in the opposite (descending) order.
This was not working as expected.
For now, solely using the event date field is the simpler solution.
In the future, I'll either re-attempt this or remove the code and
simplify my codebase.
Create a cached version of the talk counter service that returns a
cached result of the talk count for that day.
This uses the Decorator design pattern to decorate the existing
`TalkCounter` service and works as they both implement the same
`TalkCounterInterface`.
Don't render `field_event_date` when viewing a talk node.
It contains the latest event date for that talk, so doesn't need to be
displayed as it's duplication of information that's already displayed
and is only there to make it easier to sort the talks on the Talks
listing page.
Technically, if a talk is due to be given today, it hasn't been
presented yet and shouldn't be included within the talk count.
This commit changes the comparison to match on talks that were given
yesterday instead of today.
Let's see if this fixes the token error on talk nodes:
> TypeError: Cannot access offset of type string on string in
Drupal\token\Token->prepareMultisort() (line 89 of
/var/www/html/web/modules/contrib/token/src/Token.php).