Can't update Theme pages

edited June 2018 in Theme support
Hi,

I'm working on Betheme/WP 4.9/PHP7
I'd want to update my home page which contains elements created by muffin builder, one of my section got one background I want to remove.
When I remove the background and upload the page, this error pops up

Fatal error: Uncaught Error: [] operator not supported for strings in /app/public/wp-content/themes/betheme/functions/meta-functions.php on line 3080
( ! ) Error: [] operator not supported for strings in /app/public/wp-content/themes/betheme/functions/meta-functions.php on line 3080
Call Stack
#TimeMemoryFunctionLocation
10.0016851272{main}( ).../post.php:0
22.102414457696edit_post( ).../post.php:194
32.203714494664wp_update_post( ).../post.php:377
42.203914504336wp_insert_post( ).../post.php:3713
52.837014928056do_action( ).../post.php:3640
62.837014928432WP_Hook->do_action( ).../plugin.php:453
72.837014928432WP_Hook->apply_filters( ).../class-wp-hook.php:310
82.837514929560mfn_portfolio_save_data( ).../class-wp-hook.php:288
92.837614929560mfn_builder_save( ).../meta-portfolio.php:320

I think this is because I upgraded to php7, it looks like those kind of errors, thank you in advance.



Comments

  • edited June 2018
    UPDATE: 

    I've tried this : 
    $mfn_items[$newParentSectionID]['items'][] = $item;

    from that:
    $mfn_items = [];
    $mfn_items[$newParentSectionID]['items'][] = $item;

  • and it successfully saved my page,but now, this happens: 
    Warning: key_exists() expects parameter 2 to be array, null given in /app/public/wp-content/themes/betheme/functions/meta-functions.php on line 2885
    Call Stack
    #TimeMemoryFunctionLocation
    10.0008402664{main}( ).../post.php:0
    22.574013898152include( '/app/public/wp-admin/edit-form-advanced.php' ).../post.php:174
    33.026714567216do_meta_boxes( ).../edit-form-advanced.php:714
    43.049414625136mfn_page_show_box( ).../template.php:1063
    53.078618648976mfn_builder_show( ).../meta-page.php:173
    63.088418824528key_exists ( ).../meta-functions.php:2885
    this is in my page options in wordpress, or on my site when the section is.
  • When i go to meta-function line 2885 : 
    // OLD Content Builder 1.0 Compatibility
    if( is_array( $mfn_items ) && ! key_exists( 'attr', $mfn_items[0] ) ){
    $mfn_items_builder2 = array(
    'attr' => $mfn_std_section,
    'items' => $mfn_items
    );
    $mfn_items = array( $mfn_items_builder2 );
    }

    "OLD CONTENT Builder?" I'm kinda stuck, should i reverse what i've done, or should i keep up with these modifications and modify more line 2885 ?
    Thanks !
  • Hello,
    please do not change any code, just update the theme to the newest version and then disable all plugins/custom scripts. Then test the page updates.t
    thanks
  • ok will do it, keep u posted
  • Can't remove the old theme.

    Upgrade has failed.


    How?

  • edited June 2018
    It corrupted my theme?have i lost everything? thanks?
  • I've seen that you changed some files, go to FTP delete old theme files and install new theme again.
    This will delete all changes of the parent theme, so please use a child theme if you wish to make theme file changes to avoid these kinds of situations in the future.
    We do not support theme files changes, so, unfortunately, we'll not be able to help you with this,
    we'll, of course, support you if the theme is not working correctly without your modifications.
    Thanks.
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.