Warning: trim() expects parameter 1 to be string, array given in /…/Tribe/Main

Home Forums Calendar Products Events Calendar PRO Warning: trim() expects parameter 1 to be string, array given in /…/Tribe/Main

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1402110
    Kelly Brady
    Participant

    After updating to latest version of The Events Calendar today, site gives the following error message at top of front page:

    Warning: trim() expects parameter 1 to be string, array given in /…/pankey.org/html/wp-content/plugins/the-events-calendar/src/Tribe/Main.php on line 2397

    Note I removed some of the internal path, replacing it with “…” above. The problem occurs even when on the base (no-pro) plugin is activated and the Pro plugin is deactivated.

    NOTE: I am aware I am not running the latest version of WordPress. I am running 4.6.9, which meets your published minimum supported WordPress requirement. I am actively in the process of updating all plugins, theme and core wordpress versions, which is why I performed this plugin update today.

    Please advise how to fix.

    #1403967

    Hi Kelly,

    Thanks so much for reaching out!

    I’m sorry to hear that you are seeing this warning on your site.  Does it affect the way that things are behaving on your site in any way?

    In any case, as a first step, let’s try to rule out if there is some type of conflict at play.
    This is usually because of:

    1.    A conflict with another plugin

    2.    A conflict with your WordPress theme

    3.    A template customization for the Events Calendar that requires updating

    When it comes to that type of issue, it is preferable to troubleshoot in a staging environment if you have one.

    A first quick test is to simply temporarily revert back to a default WordPress theme such as twenty-sixteen to see if the issue persists.

    The next step would be to go through our testing for conflicts procedure and let us know what you find out.

    Basically the goal here is to revert back to a bare WordPress installation to see if the problem persists. It also allows us to pinpoint what the cause of the issue is.

    But, before you do that, there are 2 things I would advise:

    1.    Make a backup of your database

    2.    Consider activating a “Maintenance Page” plugin if you are doing this on your live site (to minimize impact on your visitors)

    Let me know how that goes!

     

    Thanks,

    Jaime

    #1409940
    sandstormchi
    Participant

    Upgrading wordpress core to 4.7.0 or later should fix the issue. The issue stems from the plugin using wp_parse_url with the ‘$component’ parameter, for which support was only added after WP4.7.0. Before commit 124a78f7e65c85038223b7672ed2c3c34334aaac, the plugin used php’s OOTB ‘parse_url’ function, which only required PHP 5.1.2+

    Modern Tribe, please either fix this bug, or update your requirements to WP 4.7, it currently states WP 4.5.

    Thanks!

    Refs:
    http://php.net/manual/en/function.parse-url.php

    wp_parse_url()


    https://github.com/moderntribe/the-events-calendar/commit/124a78f7e65c85038223b7672ed2c3c34334aaac#diff-e5ad0809a1399fb28c50f3775e36ba7eR2392

    #1409969

    Thanks for your input!

    Kelly- let us know how it goes!

    #1423562
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Warning: trim() expects parameter 1 to be string, array given in /…/Tribe/Main’ is closed to new replies.