Embedded list recurrent events always shown
I can't develop more right now, but even though I've seen recent fixes on this ( c68e42ad , f4a0ef5d ), recurrent filter for embedded event list is buggy in our instance bcn.convoca.la
I understand that the intention is to set show_recurrent
to anything "true-like" if we really want recurrent events, and otherwise, they won't show.
version
gancio 1.4.3
Error reproduction
Try 3 embeds, and just one with recurrent.
<gancio-events baseurl="https://bcn.convoca.la" title="CSA Can Vies (amb recorrents)" places="2" show_recurrent="true" sidebar="true" theme="dark"></gancio-events>
<gancio-events baseurl="https://bcn.convoca.la" title="Tota Barcelona" maxlength=10 sidebar="true" theme="dark"></gancio-events>
<gancio-events baseurl="https://hacker.convoca.la" title="Coses hackers en altres llocs" maxlength=10 sidebar="true" theme="dark"></gancio-events>
See the second one, whose url does not in fact contain show_recurrent=true (as expected). However, recurrent event "hacklab logout" is returned by the API
Workaround
If however, I modify the gancio js script and make it so it sends "show_recurrent=false" when I don't want recurrent events, as this: https://bcn.convoca.la/api/events?max=10&show_recurrent=false
, then it works, and no "hacklab" event is shown.
There's a live demo with the modified script at the hacklab's site
Possible solution
recheck the logics, I didn't find anything wrong. Maybe send always the parameter and check correctly against show_recurrent == false
explicitly with == instead of === ?? And left commented in the code that by default, we don't want to show recurrent events via api?