Support » Plugin: Events Manager » function not working after upgrade to 5.8.1.3

  • simonc17

    (@simonc17)


    Hi,

    I have a custom function that for a recurring event generates a list of the IDs of each event in that series. I then use this to write out the date and time of the recurring events as a list when viewing a single event in the series.
    The function is:

    add_filter(’em_event_output_placeholder’,’recurrence_placeholders’,1,3);
    function recurrence_placeholders($replace, $EM_Event, $result) {
    global $wp_query, $wp_rewrite;
    switch( $result ){
    case ‘#_RECURRENCEID’:
    $replace = $EM_Event->recurrence_id;
    break;
    }
    return $replace;
    }

    In the event list I then use #_RECURRENCEID as follows:

    {has_tag_services}
    {is_recurrence}
    <h3>Future services:</h3>
    [events_list recurrence=”#_RECURRENCEID”][/events_list]
    {/is_recurrence}
    {/has_tag_services}

    This has been working well for two years. Since upgrading today however to the latest EM version, the list of recurring events now shows the date and time of every event in the future whether it is an event in this series or not.

    Has a change under the covers in this version now invalidated the function?

    Many thanks,

    Simon

Viewing 10 replies - 1 through 10 (of 10 total)
  • thinkero

    (@thinkero)

    It seems that conditional tags like {is_future}{/is_future} are not working.
    I have a similar problem transmitting a value #_LOCATIONPOSTID via shortcode.

    • This reply was modified 4 months ago by  thinkero.
    Plugin Support angelo_nwl

    (@angelo_nwl)

    just to confirm, your custom placeholder and custom conditional placeholder are both not working or only the placeholder?

    simonc17

    (@simonc17)

    Hi Angelo,

    The conditional placeholders (e.g. has_tag_services) are working OK. So, if I have an event not tagged as ‘services’ and that is not a recurring event then I get no list of future related events which is correct.

    The problem is only appearing with recurring events. Either the custom function (and hence custom placeholder) is no longer working or the event list shortcode search attribute ‘recurrence’ is not working. The custom placeholder should have the ID of the recurring event which is then used in the search attribute to return all events in that recurring series.

    Do you know how I can print out the value of #_recurrenceid so I can check it is being set correctly?

    Thanks

    Simon

    simonc17

    (@simonc17)

    Hi Angelo,

    Managed to print out the value of #_RECURRENCEID. It is correctly set to the ID of the recurring event. So the custom function and custom placeholder are OK.

    I then put this value into the event list shortcode as [events_list recurrence=”1632″][/events_list] and the correct list of related events is generated.

    So what is now wrong with [events_list recurrence=”#_RECURRENCEID”][/events_list] as this was working until the upgrade to 5.8.1.3? I am assuming it no longer likes the placeholder name as the value for recurrence, in which case what can I do?

    Thanks,

    Simon

    Plugin Support caimin_nwl

    (@caimin_nwl)

    NetWebLogic Support

    Hi Simon,

    Where exactly are you using that shortcode?

    simonc17

    (@simonc17)

    Hi,

    I’m using it in Events > Settings > Formatting > Events > Single event page format.

    The conditional placeholders test if the event selected from the calendar is tagged as a service and if it is, whether it is a recurring event. If it is a recurring event then the shortcode gets all the events generated from the recurring template. Which recurring template it is is worked out by the custom function and held by the custom placeholder.

    I know that the placeholder has the right recurring template ID as I printed the value out immediately after the list generated by the shortcode. Putting that value into the shortcode rather than the placeholder name gets all the correct recurring events. So it is as if you can no longer use a placeholder name as the value for a search attribute.

    This all worked beautifully until I upgraded from 5.8.1.1 to 5.8.1.3.

    Thanks for the help.

    pferdetermine

    (@pferdetermine)

    I think I have the same issue. See my bug-ticket here: https://eventsmanagerpro.com/support/tickets/events_list-does-no-longer-work-in-em-settings-for-single-event/

    I identified that from EM 5.8.1.2 onwards it is no longer possible to use a shortcode in the settings page! Up and until EM 5.8.1.1 everything works fine.
    Event the shortcode with standard-placeholders do not work correctly anymore, e.g. [events_list near=”#_LOCATIONLATITUDE,#_LOCATIONLONGITUDE” near_unit=”km” near_distance=”100″ limit=”10″ pagination=”1″] gives as a result ALL events and not only the nearby events.
    So the error is probably related to the updates in EM 5.8.1.2!

    Plugin Support caimin_nwl

    (@caimin_nwl)

    NetWebLogic Support

    Just to let you know, the issue with placeholders not parsing within shortcodes on the single event page has been reported to the developer team for a fix.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    unfortunately this bug arose by us trying to fix another bug where users were trying to create shortcodes with formats within it e.g.

    [events_list]#_EVENTNAME<br>[/events_list]

    Previously you’d end up with a list containing the name of the same event since #_EVENTNAME was parsed before the shortcode. 5.8.1.2 ‘fixed’ this by parsing shortcodes first, but inadvertedly created this bug you’re reporting since any arguments are not parsed yet.

    We’re going to revert this in the next update. However, since we’re in a bit of a limbo with timezone integration it may be a few more weeks between the next update, so the short-term solution would be to manually edit and comment out or remove this line on /events-manager/classes/em-events.php (line 1710):

    $format = do_shortcode($format); //parse shortcode first, so that formats within shortcodes are parsed properly

    Sorry for the inconvenience! We’ll also be putting this out on the next dev update too, so if you’re up for experimenting with our new timezone features, we’d love to get more people trying it out.

    Hi Marcus,
    Many thanks for looking into this, these things happen. The issue wasn’t causing a serious problem so I simply commented out the code that creates the recurring list in the Events List formatting section as a temporary fix.
    Keep up the great work. I looked at many event managers/calendars before deciding upon yours and haven’t ever regretted the decision.
    Simon

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.