Events Made Easy › Forums › Generic › Bug with “show_recurrent_events_once”?
Tagged: bugs, show_recurrent_events_once
- This topic has 10 replies, 2 voices, and was last updated 2 years, 4 months ago by Franky.
-
AuthorPosts
-
Mon 25 Jul 2022 at 22:05 #64458AnonymousInactive
Hey Franky,
We just noticed that our recurrent events are being repeated even though we have the “show_recurrent_events_once=1” attribute enabled. Is this a bug or is there something else I should be looking at. For reference, it’s at the bottom of fallsbaptist.org.
Mon 25 Jul 2022 at 22:36 #64459FrankyKeymasterWhen I look at the bottom of that page, I see 4 events rendered (of course unsure if EME is doing the rendering, but let’s assume so). The events are rendered with specific div’s, and all 4 have different classes (feature-cal-col2, feature-cal-col3 and feature-cal-col4 for the second, third and fourth div), so it is not EME doing that unless you configured 4 event lists or so. So: how do you do that rendering?
Mon 25 Jul 2022 at 22:59 #64461AnonymousInactiveI am using EME to do that. It’s kind of complicated, but sufficed to say that I’m using templates and lots on instances of [eme_events]. 🙂
Mon 25 Jul 2022 at 23:04 #64462AnonymousInactiveIt’s actually the application I needed you to design the offset function for. https://pasteboard.co/qBpumA1aG64F.png
Mon 25 Jul 2022 at 23:35 #64463FrankyKeymasterWell, if using several instances of eme_events, those instances don’t know about each other which is what I think you have going on here. What is the shortcode+options for the event of 5 August and compare it to the one for 29 July (so the second and fourth div).
But maybe the offset together with show_recurrent_events_once is not doing what you expect here: the offset is used *before* the show_recurrent_events_once is being evaluated (to get the list of events from that offset onwards using sql, it is in fact also used for paging).
Maybe, in your use-case, it would not be an offset, but just the possibility to show 1 specific event from the resulting list of events. Which in fact would call for a better name for that option and other coding …Mon 25 Jul 2022 at 23:45 #64464AnonymousInactiveI think I follow you. It’s been working perfectly for a long time, but that was before I implemented the offset feature, which I think is making it so that the show_recurring_events_once feature to not trigger like I want. As you said, my lists don’t know about each other. I think I know the problem and it’ll require a rebuild from my end.
Tue 26 Jul 2022 at 00:29 #64465FrankyKeymasterI meant coding on my end, but I’m curious about your solution here 🙂
Tue 26 Jul 2022 at 00:38 #64466AnonymousInactiveBecause I was originally trying to put individual elements into my page builder (Themeco’s Cornerstone Page Builder: https://theme.co/cornerstone), I tried to put each element in its own text field and call an individual [events_list] for each one and controlled the output via a template and the offset option. So, each date had its own [events_list] and template, each title had its own [events_list] and template, and each description had its own [events_list] and template.
Before I had the offset option, I returned one item for the first column, two items for the second column, three items for the third column, and four items for the fourth column. I hid the unwanted items via display:none in css. This also allowed, apparently, the show_recurring_events_once feature to display properly, since all the items were technicaly in each list. The offset feature let me clean up my CSS significantly, however, at the cost of the show_recurring_events_once feature.
Now, however, since the show_recurring_events_once isn’t firing like I want, I’m going to have to make it all one instance of [events_list] and use the template header and footer to build out my calendar from the ground up. I’ll try to replicate the output HTML that’s currently in place so I don’t need to tweak the CSS that much. I probably should have done it this way from the beginning, but I was being lazy. 🙂 No more.
Tue 26 Jul 2022 at 10:25 #64467FrankyKeymasterbtw, using 1 eme_events call instead of 4 will speed up page load. Also, if you want to add different class elements depending on the number of the event in the list, you can use #_EVENT_COUNTER to test for that (using [eme_if]).
Tue 26 Jul 2022 at 19:35 #64469AnonymousInactiveRebuilt to match what preceded and all works as hoped. Was quite easy to do. Thanks for the #_EVENT_COUNTER tip. Very helpful.
Tue 26 Jul 2022 at 20:10 #64470FrankyKeymasterGlad you got it to work. Feel free to post a template in the how-to section (and I always appreciate a donation for some coffee and a good wp review 😉 )
-
AuthorPosts
- The forum ‘Generic’ is closed to new topics and replies.