WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Updated tolatest Version and it broke the Calendar (12 posts)

  1. dyerphil@ymail.com
    Member
    Posted 1 year ago #

    I didnt see a similar error on the forum. The error I get when I go into the calendar post-update is:

    "Warning: in_array() expects parameter 2 to be array, null given in /home/p25lh1jc/public_html/wordpress/wp-includes/post-template.php on line 1039"

    Webite link is: http://romeoareateaparty.org/wordpress/

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. alvarix
    Member
    Posted 1 year ago #

    I am getting this as well.
    When I google the error I see that tons of sites are displaying it.

    For me
    v2.0.11 pro
    on the upcoming events page I get the error.

    I think it may have to do with the get_ancestors() function, as I had to rewrite that function on another site with this update for a similar array error.

    I've been emailing tribe support about it since yesterday and havent heard back.

  3. dyerphil@ymail.com
    Member
    Posted 1 year ago #

    Is there any update on this issue? Are others experiencing the problem?

  4. bloc78
    Member
    Posted 1 year ago #

    Others, in fact many calendars that use this plugin look like they have the same issue. Google search "post-template.php on line 1039" and you'll see the number of broken calendars.

    I came here to ask for a fix too, or a hack that I can apply to get rid of the message.

  5. smielock
    Member
    Posted 1 year ago #

    Hi all,

    I had the dreaded line 1039 warning and I fixed it using the steps I explain in one of my post. Please find Calendar Month View Issues by smielock. My very first post describes my problem and my second post is the fix. It is super easy and you will see immediate results. Hope that helps.

  6. smielock
    Member
    Posted 1 year ago #

    Here you go. Try this. I just went ahead and cut and paste my fix (I found) here so you have it at the ready. Cheers.

    I found a fix for the Array Warning, actually off of the WordPress Support Ticket site. Here is the work around.

    /wp-includes/post-template.php file is the one you will edit.

    Line 1039 of wp-includes/post-template looks like:

    if ( in_array( $page->ID, $_current_page->ancestors ) )

    Recommended change:

    if ( gettype($_current_page->ancestors) === 'array' && in_array( $page->ID, $_current_page->ancestors ) )

    I also recommend you simply rename the original post-template.php file in case this does not work or creates additional problems.

  7. bloc78
    Member
    Posted 1 year ago #

    Thank you smielock, adding that code edit worked for me.

  8. dyerphil@ymail.com
    Member
    Posted 1 year ago #

    Thank you very much smielock, for that fix. Unfortunately, I am trying to fill in for our administrator, who is gone for a few months and I have no clue how to get to this file, to edit it I did try and figure it out via the help files, but I cant figure it out. I have Administrator rights, but I dont have root/server access. I assume, I will need that access, since I dont see/wp-includes in themes editor? Thanks agaim. I will see if I can beg our normal admin to work on it while he is on the road.

  9. smielock
    Member
    Posted 1 year ago #

    @ dyerphil@ymail.com

    I sent you an email asking if you needed help in finding and changing the file. I wasn't sure you may have gotten it so I wanted to just reach out on the forum in case I missed you. I am glad the fix helped bloc78. I have asked for assistance on here a couple of times and folks are really really quick to chime in when they can. Pretty strong support structure on this forum. With that said thanks to all who have assisted me. I am sure I may be back with some other small tweaks. Very nice Calendar thus far. I am most likely going to upgrade to the Pro version soon. I use it too often and Pro seems to have some features I could really use. Sounds like a sales pitch, which I am not affiliate to this plugin, but when I find something I really like and works for me I like to support it. Cheers all.

  10. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Guys: just to update everyone here, we're working with a few threads (between this one and another here at dot-org, plus a couple on the PRO forums too) related to this and have our devs examining what's up right now. We are unable to recreate this locally, which makes it challenging, but the fix provided above - thanks smielock! - should help us in tracking down what's up.

    I will follow-up with an update once I've got one. Just know this is a priority and we should have news in some capacity over the next day. Thanks to everyone for their patience so far.

  11. smielock
    Member
    Posted 1 year ago #

    You are welcome. Thanks all for your support in some of the issues I have been looking to fix. Great Forum.

  12. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Glad to be of service!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic