• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Genesis 2.0.0 / The Event Calendar problem

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: resolved

Tagged: event calendar, event calendar pro, genesis 2.0, TEC

  • This topic has 5 replies, 4 voices, and was last updated 12 years, 7 months ago by Gary Jones.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • August 13, 2013 at 8:44 am #56069
    frankomator
    Member

    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

    August 13, 2013 at 12:04 pm #56120
    Gary Jones
    Member

    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.


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    August 13, 2013 at 12:20 pm #56126
    Gary Jones
    Member

    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.


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    August 13, 2013 at 1:31 pm #56138
    AnitaC
    Keymaster

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


    Need help with customization or troubleshooting? Reach out to me.

    October 30, 2013 at 11:31 am #69930
    worldviewpr
    Member

    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.

    October 30, 2013 at 6:43 pm #70027
    Gary Jones
    Member

    It's present in Genesis 2.0.1.


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Genesis 2.0.0 / The Event Calendar problem’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble