Warning Text on Recurring Events

Home Forums Calendar Products Events Calendar PRO Warning Text on Recurring Events

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1231292
    William
    Participant

    Hello,

    Since the last update there are now warning statement son each of my recurring events pages. They do not seem to be present on single events.

    Here’s the warning message:

    Warning: Invalid argument supplied for foreach() in /home/harvmrgi/public_html/hbc/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 1376

    Here’s an example from the site: https://hbcwr.ca/event/harvest-essentials-june16-copy-copy-copy/2017-02-12/

    I looked up line 1376 on Meta.php and found the following foreach loop:

    foreach ( $rule[‘custom’][‘week’][‘day’] as $day ) {
    $weekdays[] = $date_strings[‘weekdays’][ $day – 1 ];
    }

    I also noticed that a couple other users have had the same problem with recurring events and an issue with the code in Meta.php:

    warning text appears on some of my calendar posts

    Errors in recurring events – invalid arguments

    I’m wondering if you have figured out what is causing this error?

    Thanks,

    WIll

    #1232251
    George
    Participant

    Hey Will,

    Thanks for reaching out! I’m sorry to hear about these problems.

    I cannot recreate this problem with recurring events on my own testing site, so we will need to do some investigating here.

    One thing I noticed about your recurring event is that, where a day name or number should be in the recurrence description of your event, there’s just some empty text saying “[day]”, as shown in this screenshot ? https://cloudup.com/c1Dk2rh03gS

    That is odd and not something I can reproduce on my site.


    To help me investigate this, I’m wondering if you can clarify a few things for me:

    1. The URL of the event you shared has “copy-copy-copy” in it. Why? What is the origin of this text in the URL?

    2. Can you share a screenshot of the “Time and Date” section of the edit screen for an event on which these problems occur? To clarify, this “Time and Date” section is where the recurrence rules are configured. So if you can find a recurring event that has these issues, share a screenshot of the complete “Time and Date” section to show its complete configuration. Here is an example of what a “Time and Date” screenshot might look like → https://cldup.com/JLJmZjrBFx-3000×3000.png

    You can do so by uploading the screenshots to this thread. If you have issues with that, you can upload to Imgur.com, Flickr.com, CloudUp.com, or any similar image-hosting site; then just share the links to those images here and I’ll take a look.

    Thank you!
    George

    #1232835
    William
    Participant

    Hi George,

    Thanks for the help. I ended up solving the issue.

    1) The reason for the copy-copy-copy, in the event has to do with how our admin created the event. She duplicated old events so that she wouldn’t have to type in the information each time (I think that uses another plugin that allows you to duplicate posts). However since the event is a two-part event it was setup as a recurring event. As a result she could not edit the permalink and so it added -copy-copy-copy and couldn’t be changed.

    2) Once I looked more closely at the time and date section I found out what was causing the error. The event end date is February 19. For some reason an exclusion was added that said the event will not run on February 19. This must have tripped up the foreach loop and caused the error. Once I deleted this exclusion, the warning message disappeared.

    Thanks again for the help!

    Will

    #1232918
    George
    Participant

    Thanks for this update, Will! I’m glad to hear things are working for now.

    I will close this thread for now, but feel free to open a new thread any time if other issues or questions arise. 🙂

    Cheers!
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Warning Text on Recurring Events’ is closed to new replies.