Theme Update 21.1.2 Broke Site

Hi there,

I did a betheme update from version 21.0.6 to 21.1.2. I believe the WP version currently in use is 5.1. After the update, the website went completely white. I could still access the WP dashboard, though. I disabled all the plugins and that didn't fix it so I don't believe it's a plugin conflict of any kind. The site is elsnerlawfirm.com. I've reverted back to a backup in the meantime to restore functionality, but the hosting company provided some error information that mentions the child theme that I've included below. Do I need to make an alteration to the child theme in some way? Thank you for any help you can provide!

Error info:

PHP Fatal error: Uncaught Error: Call to undefined function mfn_opts_show() in /nas/content/live/elsnerlaw/wp-content/themes/betheme-child/header.php:36\nStack trace:\n#0 /nas/content/live/elsnerlaw/wp-includes/template.php(688): require_once()\n#1 /nas/content/live/elsnerlaw/wp-includes/template.php(647): load_template('/nas/content/li...', true)\n#2 /nas/content/live/elsnerlaw/wp-includes/general-template.php(41): locate_template(Array, true)\n#3 /nas/content/live/elsnerlaw/wp-content/themes/betheme-child/page.php(10): get_header()\n#4 /nas/content/live/elsnerlaw/wp-includes/template-loader.php(74): include('/nas/content/li...')\n#5 /nas/content/live/elsnerlaw/wp-blog-header.php(19): require_once('/nas/content/li...')\n#6 /nas/content/live/elsnerlaw/index.php(17): require('/nas/content/li...')\n#7 {main}\n thrown in /nas/content/live/elsnerlaw/wp-content/themes/betheme-child/header.php on line 36, referer: http://elsnerlawfirm.com




Comments

  • Hey,
    we entered your website and everything si working fine: http://prntscr.com/n1dw3t
    Please clear your cache and remember to disable cache and optimization plugins while updating the theme.
    thanks
  • Hi again,

    I'm still having the issue during update unfortunately. I just tried the update again and got the same error. My site goes white and it just says "site is having technical difficulties". You didn't see that when you checked the site because I had restored the site instance from before I updated (to a working version). I don't have any caching plugins or anything so nothing to deactivate there. The error code is the same as last time. It keeps mentioning /betheme-child-/header.php on line 36. Is there something in my child theme that might be causing the error?

    Error Info:

    [Thu May 16 12:04:18.801733 2019] [php7:error] [pid 14515]
    [client 47.202.247.180:37136] PHP Fatal error: Uncaught Error: Call to
    undefined function mfn_opts_show() in
    /nas/content/live/elsnerlaw/wp-content/themes/betheme-child/header.php:36\nStack
    trace:\n#0 /nas/content/live/elsnerlaw/wp-includes/template.php(722):
    require_once()\n#1
    /nas/content/live/elsnerlaw/wp-includes/template.php(671):
    load_template('/nas/content/li...', true)\n#2
    /nas/content/live/elsnerlaw/wp-includes/general-template.php(41):
    locate_template(Array, true)\n#3
    /nas/content/live/elsnerlaw/wp-content/themes/betheme-child/page.php(10):
    get_header()\n#4
    /nas/content/live/elsnerlaw/wp-includes/template-loader.php(78):
    include('/nas/content/li...')\n#5
    /nas/content/live/elsnerlaw/wp-blog-header.php(19):
    require_once('/nas/content/li...')\n#6
    /nas/content/live/elsnerlaw/index.php(17):
    require('/nas/content/li...')\n#7 {main}\n thrown in
    /nas/content/live/elsnerlaw/wp-content/themes/betheme-child/header.php
    on line 36
  • Hello,
    This is because you're using an old method for calling functions in a child theme. Recent changes in Envato terms & conditions forced us to make some modifications to the theme files. One of those changes is replacing "mfn_opts_show()" to "echo mfn_opts_get()". This is why your child theme does not work after the theme update.

    To make your Child Theme work again, you have to find that function in all of your modified files( in the child theme) and replace the 'mfn_opts_show()' to 'echo mfn_opts_get()'
    Look at the screenshot example to make it more understandable: https://pasteboard.co/IdJyIOZ.jpg

    thanks
  • Hi, thanks for the info.

    I changed all of the instances of 'mfn_opts_show()' to 'echo mfn_opts_get()' in all my child theme files as instructed and then tried to update BeTheme again. I now get a new error related to a different function called 'mfn_builder_print()'. See error info I get below. Does that mfn_buildfunction need to be changed to something different as well?

    New Error Info:

    [php7:error] [pid 2731]
    [client 206.225.134.122:42290] PHP Fatal error: Uncaught Error: Call
    to undefined function mfn_builder_print() in
    /nas/content/live/elsnerlaw/wp-content/themes/betheme-child/page.php:25\nStack
    trace:\n#0
    /nas/content/live/elsnerlaw/wp-includes/template-loader.php(78):
    include()\n#1 /nas/content/live/elsnerlaw/wp-blog-header.php(19):
    require_once('/nas/content/li...')\n#2
    /nas/content/live/elsnerlaw/index.php(17):
    require('/nas/content/li...')\n#3 {main}\n thrown in
    /nas/content/live/elsnerlaw/wp-content/themes/betheme-child/page.php on
    line 25


  • Yes, you have to change the:
    <?php mfn_builder_print($customID, true); ?>
    to:
    $mfn_builder = new Mfn_Builder_Front($customID, true);
    $mfn_builder->show();

    See the screenshot, red bordered code have to be overwritten with green bordered code:

    Thanks

  • Thanks for your additional guidance with that.

    I found those new error sections in both index.php and page.php. They both had some extra stuff written before after "mfn_builder_print" so when I just replaced the sections entirely with "$mfn_builder = new Mfn_Builder_Front($customID, true); $mfn_builder->show();" some things were a little wonky on my blog page. But then I went ahead and updated the theme and after I updated, I just went to the parent theme, copied over what the new version had written in those sections, and replaced the corresponding old sections in my child theme.

    All is working perfectly now! Thanks so much for your guidance. I really appreciate all your help. :)
  • Glad to hear that.
    If you have some other questions, feel free to ask.
    Thanks
Sign In or Register to comment.