• Resolved fieseline

    (@fieseline)


    Hi.
    After updating to 4.6 I found my website partially disturbed. WP showed two error messages (see below) which quickly disappeared, then the menu ribbon of my theme did not keep its position. Disabling EM solved the problem.
    I would really like to keep both EM and the theme…..

    Error messages:
    Warning: array_merge(): Argument #1 is not an array in /homepages/24/d17910408/htdocs/wordpress/wp-includes/theme.php on line 1557

    Warning: array_unique() expects parameter 1 to be array, null given in /homepages/24/d17910408/htdocs/wordpress/wp-includes/theme.php on line 1557

    sc, fl

    https://www.ads-software.com/plugins/events-manager/

Viewing 15 replies - 1 through 15 (of 21 total)
  • Hi,

    Do you see the error if you test with the default WordPress theme?

    Thread Starter fieseline

    (@fieseline)

    Hi,
    Using another theme is no problem. No error message appears.

    Sch?ne, fl

    I have the same issue. Disabled events manager and issue went away.
    Version 5.6.5
    Pro Version 2.3.9

    I have the same issue. Disabled events manager and issue went away.
    Version 5.6.5
    Pro Version 2.3.9
    Edit – sorry for duplicate post.

    Just tried going to 2016 theme and problem went away as well. So its an EM / theme compatibility issue.
    I also tried to disable EM on all pages except the bookings page – (idea was to try and limit error messages to one page) – no luck.

    @fieseline
    I am using RT theme 17. https://themeforest.net/item/rttheme-17-responsive-wordpress-theme/2703099
    What theme are you using? What versions of EM are you using?
    I am happy to upgrade if its fixes the issue.

    Hi,
    I too have the same problem with EM .
    Using Integrity WP updated with the 5.6.5 version of EM .
    How can I fix ? the site of my client so it is important to immediately solve the problem .
    Thanks

    Thread Starter fieseline

    (@fieseline)

    @nickm37
    I am using theme “sechzehn” by Oliver gast (https://www.olivergast.de). I contacted the theme author and gave him the hint that there are problems with EM and his theme. He will be happy to get things solved….Using EM 5.6.5.

    fl

    @fieseline
    cool. I would be interested to know if your author thinks its the theme or EM end causing the issue.

    Thread Starter fieseline

    (@fieseline)

    Unfortunately the theme author is too busy at the moment and cannot say something about this issue. But can any of the EM authors say something ? Seems everyone is waiting here and nothing is happening….

    I found the issue in file events-manager/em-posts.php line 28. The function array_shift not only returns the changed array, it changes the input array itself. Thus, WP’s global $_wp_theme_features is changed. When WP tries to access an element inside it, the element isn’t where WP expects it to be and NULL is returned.

    Instead, I think the plugin author needs to use $_wp_theme_features[‘post-thumbnails’][0], which is what WP uses inside wp-includes/theme.php to access the same values.

    Change line 28 in plugin file events-manager/em-posts.php
    $post_thumbnails = array_shift($_wp_theme_features['post-thumbnails']);
    to
    $post_thumbnails = $_wp_theme_features['post-thumbnails'][0];

    And the issue should be fixed. This should be changed in the plugin. It isn’t a theme issue. It happens in themes that try to use the add_theme_support( ‘post-thumbnails’, array()) function with Events Manager plugin active.

    Right On bridgetwes!!!!!

    Your solution fixed my problem. Works Perfect!

    Change line 28 in plugin file events-manager/em-posts.php
    $post_thumbnails = array_shift($_wp_theme_features[‘post-thumbnails’]);
    to
    $post_thumbnails = $_wp_theme_features[‘post-thumbnails’][0];

    Hi, just came back to post that my theme author was blaming events manager to find @bridgetwes solution. Well done. Thanks Bridget ??

    Can the Events Manager author please acknowledge Bridget’s fix and roll it into the next update?

    My site is fixed with the fix. if you do a google search on the php error this thread pops up first followed by quite a few sites affected.

    Thread Starter fieseline

    (@fieseline)

    @all ??
    Great work! Thanks to bridgetwes, everything is working fine again. Had already been afraid of entering 100+ events into another plugin…
    Would only be great if the plugin author could appreciate this….

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘EM and Theme issues’ is closed to new replies.