Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Support request] Generate Press and Give Conflict

Home Forums Support [Support request] Generate Press and Give Conflict

Home Forums Support Generate Press and Give Conflict

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #522964
    James

    Uisng:
    GeneratePress Version: 2.0.2 and Give Version: 2.0.6

    Warning: Illegal string offset ‘_meta-generate-page-header-image’ in /www/wp-content/plugins/gp-premium/page-header/functions/metabox.php on line 22 Fatal error: Uncaught Error: Cannot use string offset as an array in /www/wp-content/plugins/gp-premium/page-header/functions/metabox.php:22 Stack trace: #0 /www/wp-includes/class-wp-hook.php(288): add_generate_page_header_meta_box(‘give_forms’) #1 /www/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 /www/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /www/wp-admin/edit-form-advanced.php(334): do_action(‘add_meta_boxes’, ‘give_forms’, Object(WP_Post)) #4 /www/wp-admin/post-new.php(76): include(‘/www/wp-admin/e…’) #5 {main} thrown in /www/wp-content/plugins/gp-premium/page-header/functions/metabox.php on line 22

    #523284
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Very strange, it seems Give is manipulating the data from the database and returning it as a string instead of an array. I’ll have to get in touch with them to see the reasoning.

    For now, add this function to get around it:

    add_action( 'after_setup_theme', 'tu_remove_metaboxes_from_give' );
    function tu_remove_metaboxes_from_give() {
        if ( 'give_forms' == get_post_type() ) {
            remove_action( 'add_meta_boxes', 'generate_register_layout_meta_box' );
            remove_action( 'add_meta_boxes', 'add_generate_page_header_meta_box', 50 );
        }
    }
    #523293
    James

    I donwloaded the child theme and added the above code to the functions.php of the child theme and yes it’s working. If you need more info, I would be happy to give you what info you might need to work with them. Thank you

    #523350
    Tom
    Lead Developer
    Lead Developer

    I just made an adjustment to the code so it only applies to Give.

    We’ll also harden our code a little to prevent issues like this in the future 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.