Genesis 2.0.0 / The Event Calendar problem

Community Forums Forums General Discussion Genesis 2.0.0 / The Event Calendar problem

This topic is: resolved

This topic contains 5 replies, has 4 voices, and was last updated by  Gary Jones 10 months, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #56069

    frankomator
    Participant

    Using the Event Calendar plugin by Modern Tribe with Genesis 2.0.0 produces an PHP error message in the monthly view of the calendar such as:
    “Warning: in_array() [function.in-array]: Wrong datatype for second argument in (…) /wp-content/themes/genesis/lib/functions/general.php on line 293″

    The developer is aware of the problem but can’t fix it:

    “OK, so I can now replicate this – I’m not really sure we can say this is a bug with The Events Calendar, however. What is happening is that Genesis’s code (…) is calling a function and expecting it to return a type of data called an array – but actually it will not always do so – and that is causing the error. So I think it would be worth reporting this to the theme authors to see if there’s anything they can do on their level – I’m sure they could easily ensure that an array, even an empty array, is returned in these circumstances – as I don’t see any particularly easy ways of mitigating this with a snippet that you can drop in to your child theme’s functions.php file or anything like that. In summary, at this point I would recommend: A) Turning of the display of errors (see Frank’s post or seek help from your web host if necessary as not all environments are the same) B) Report this issue to StudioPress and ask if they can patch genesis_get_cpt_archive_types_names() so that it can be relied upon to return an array (right now it may return a null value in situations like this one)”

    The whole thread: http://tri.be/support/forums/topic/genesis-2-0-incompatibility-in-month-view/

    Any ideas on how to fix this?

    Best,
    Frank

    #56120

    Gary Jones
    Moderator
    Post count: 691

    In genesis/lib/functions/general.php, line 269, right before the foreach that appears on line 270, add:

    $post_type_names = array();

    If that works, let me know, and I’ll ensure that it makes it into the next release of Genesis, so that your hack is persisted.

    Kudos to the Events Calendar dev for tracking this down.


    Changes in Genesis 2.1 – the ultimate guide to every single change in Genesis Framework 2.1, 2.1.1 and 2.1.2 (all 90 of them!) | @GaryJ

    #56126

    Gary Jones
    Moderator
    Post count: 691

    Dorian Speed (mentioned on the original bug report) has confirmed it works for her.

    I’ve submitted a patch for Genesis, so it should be included in 2.0.1 or 2.1, whichever comes first.


    Changes in Genesis 2.1 – the ultimate guide to every single change in Genesis Framework 2.1, 2.1.1 and 2.1.2 (all 90 of them!) | @GaryJ

    #56138

    AC
    Blocked
    Post count: 7712

    Thanks GaryJ for responding to my tweet. You’re the BEST!

    #69930

    worldviewpr
    Participant
    Post count: 48

    Did this change for the better make it to 2.0.1, or will it find its way to 2.1? Thanks for your eagle eye.

    #70027

    Gary Jones
    Moderator
    Post count: 691

    It’s present in Genesis 2.0.1.


    Changes in Genesis 2.1 – the ultimate guide to every single change in Genesis Framework 2.1, 2.1.1 and 2.1.2 (all 90 of them!) | @GaryJ

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Genesis 2.0.0 / The Event Calendar problem’ is closed to new replies.