Support » Plugin: Events Manager » Recurring events on first monday of the month

  • Resolved bartvandermark

    (@bartvandermark)


    I cant succeed in creating an recurring event on every first monday of the month… It always starts on the first day of the month which is often not a monday… What should i do? These are my settings (sorry in dutch…):

Viewing 14 replies - 16 through 29 (of 29 total)
  • Hi slewisma

    Unfortunately the error you reported might cause problems elsewhere, but not with the wrong day issue !
    If have tested it on my system that is running properly, but it shows the same error, whilst the events do have the proper date and day.

    Below my errlog after creating a reoccurring event for every first monday
    [02-Aug-2018 15:26:13 UTC] PHP Notice: Undefined offset: 4 in /subdomains/helpdesk/wp-content/plugins/custom-meta-widget/customMeta.php on line 149
    [02-Aug-2018 15:26:13 UTC] PHP Notice: Undefined offset: 4 in /subdomains/helpdesk/wp-content/plugins/custom-meta-widget/customMeta.php on line 149
    [02-Aug-2018 15:26:13 UTC] PHP Notice: Undefined index: start_days in /subdomains/helpdesk/wp-content/plugins/events-manager/templates/forms/event/bookings-ticket-form.php on line 47
    [02-Aug-2018 15:26:21 UTC] PHP Notice: Undefined offset: 4 in /subdomains/helpdesk/wp-content/plugins/custom-meta-widget/customMeta.php on line 149
    [02-Aug-2018 15:26:21 UTC] PHP Notice: Undefined offset: 4 in /subdomains/helpdesk/wp-content/plugins/custom-meta-widget/customMeta.php on line 149
    [02-Aug-2018 15:27:03 UTC] PHP Notice: Undefined offset: 4 in /subdomains/helpdesk/wp-content/plugins/custom-meta-widget/customMeta.php on line 149
    [02-Aug-2018 15:27:03 UTC] PHP Notice: Undefined offset: 4 in /subdomains/helpdesk/wp-content/plugins/custom-meta-widget/customMeta.php on line 149
    [02-Aug-2018 15:27:03 UTC] PHP Notice: Undefined index: start_days in /subdomains/helpdesk/wp-content/plugins/events-manager/templates/forms/event/bookings-ticket-form.php on line 47

    Was hoping it would be more helpful. We really need to be able to add recurring appointments to this site again soon or we’ll have to change solutions. Has anyone figured out what changed / what is going wrong? Every recurring appointment we create for 1st Wednesday, 3rd Thursday, etc. end up with the first day of the month as their date.

    Sorry that it was not the news you where hoping to get.
    It would help if the developer could tell us, where the calculation is done.
    Or add debug statements into this routine, so he can check what is happening.
    In my opinion the the program does not search for the first monday in the calendar anymore. It just selects the first day of the month.
    In the list of issues fixed, you will find a lot of changes for calculating the days. It seems to me that one of these fixes broke the reoccurring method.
    So it would be good to know which version started to cause this. If you know that you can put back the proper working version.
    On the plugin site unfortunately you cannot download older versions.
    Maybe you could ask the developer to provide older versions ?
    In that way you can try that to resolve this problem

    Figured it out. At least in my case, PHP version was the culprit. This site was still on 5.4. Changed it to 7.1 and EM works correctly now. I hope this is helpful to the OP and others.

    Hi slewisma

    It might well help the others to resolve their problem.
    My site is also running on 7.1, and does this without problems.
    So maybe a good solution you provided, which should be checked by the others that have this problem.

    Hi,

    I didn’t have this problem, but it seems like Slewisma found the problem and gave the solution.

    In response to the question, “Maybe you could ask the developer to provide older versions?” I have used the “WP Rollback” plugin to revert through various EM versions, until I found one that worked again …until the fix came out. Also, it looks like this will work for almost any plugin.

    Just my two cents: a lot of emails have come about this one issue. For the future, to try to streamline the forum’s process, it would seem to be most helpful if people would do something like the following steps:
    1. Test with other plugins inactivated, before posting
    2. Test under a WP theme, before posting
    3. Begin each post with a list of versions for: EM, EMPro, WP, PHP, and Theme.

    Thanks!

    Hi,

    I did not know that there exitst a plugin “WP Rollback”, so thanks for this information.

    To your two cents remark, my comments.
    1. Not everybody can test by disabling plugins !
    Most of the sites are live, so have to keep their functionality
    2. This is also true for testing with another theme.
    3. Start with indicating versions in use, could also be difficult as people do not
    know where to find the information indicated. But I agree that it is valuable
    information.

    My remarks to this problem.
    1. For a free version I can imagine that the response on difficulties like this
    one is slow. But this plugin has also a payed version, and then slow or not
    answering at all is not acceptable.
    2. Fixes/ improvements in software should alsways be made independently from the
    software it is running on. Or is must be clearly stated which versions are
    required. In that case you can search the plugin documentation for limitation
    of usage.
    3. If a developer cannot reproduce a problem, then it is difficult to provide a
    fix. However a developer knows what he has changed, so he can quickly indicate
    where to look. Or even suggest to try with version x.xx of the plugin (if you
    can rollback to a previous version).
    4. Let us hope that the problem is resolved for the others after updating (if
    possible) their PHP version to 7

    @slewisma THANK YOU!!!!! Seems such an obvious fix now – but then the developer didn’t suggest it so it didn’t occur to me to consider it as an option. Well done.

    And thank you too @psmits1567 for your continued interest in this topic and all your suggestions.

    @aprilschmitt27 Re 3 – yes that would definitely have picked this up and identified php as the culprit for us a long while ago and avoided lots of frustration!

    Thanks all.

    Hi Patsky

    Thanks I am glad that it fixed your problem also.
    In general it always helps if a developer indicates where to look. They expect that a user keeps his software up to date. But that is not always possible, so any help in that case can solve issues more quickly!

    @psmits1567 – Thanks – yes both sites working fine now. WordPress and plugins generally kept up to date but never even thought about php!

    Alls well that ends well.

    If the plugin author is following along here, a best practice I’ve seen in other plugins is to notify on update / install if the PHP version isn’t current enough for the plugin.

    Unlike WordPress, themes and other plugins, many users have no idea what PHP version they are running and no idea how to change it. Sometimes they can change it in cpanel if they know where to look. Sometimes they have to ask the hosting company to change it and sometimes they have no choice.

    The normal advice of using a default theme and disabling all other plugins and making sure WordPress is current wouldn’t help here and would waste the user and the author’s time. Dependencies need to be called out loudly when not met.

    These have helped me:

    A plugin tool like: “WP System Info” …provides a thorough listing about your site, including versions. And you can easily view and copy this info under the WP Tools menu. Had anyone known that the PHP version was that old, it probably would have been the first recommendation, saving everyone time.

    Our host, “SiteGround” has a very easy to use free function in the cPanel, that lets you try different versions of PHP. Others may have this too. I tried the most recent and then backed down versions until the major plugins worked with it. (Paid Memberships Pro needed a little earlier version.)

    This is my only website, but I always maintain a “cloned” version …so that I can test every change, plugin or theme (new, update, deactivation, etc) on that copy. I know how stressful it can be and sleep a lot better this way. Twice I’ve used “Duplicator – WordPress Migration Plugin”, to create clones. There were some good online videos to help step through it too.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    can you try and confirm using EM version 5.9.5.1 ?

    seliquity

    (@seliquity)

    I just ran into this problem so I fixed it myself.

    The issue is the get_recurrence_days() function in em-event.php is using a relative date which triggers this bug in php: https://bugs.php.net/bug.php?id=63863 which is present in 5.6 branch but not 7.

    The fix is to simply add a line to the top of the setDate() function in em-datetime.php so it reads as follows:

    public function setDate( $year, $month, $day ){
       $this->modify('+0 day');
    

    And then since the recurring events are generated when you save it you’ll probably have to go into each one and reschedule to a different date and then back again so they’re regenerated with the correct dates.

    I don’t have a way to contact the developers directly, but hopefully someone can notify them so they can add fix this in a future version.

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘Recurring events on first monday of the month’ is closed to new replies.