Fatal error: Uncaught TypeError Cannot access offset of type string in betheme/style.php:111

Hi !


I'm the new webmaster of a website built on BeTheme 12.4 's child theme. I wasn't able to update a wp page, so i tried to change BeTheme Parent Theme with the newest one.

For tests purposes I upgraded manually my BeTheme theme from version 12.4 to 25.1.1 on my localhost (macos big sur w/ apache 2) with php 8, mysql 8.0.22 and wp 5.7.3.

I can't view any page and got this critical message:

Fatal error: Uncaught TypeError Cannot access offset of type string in betheme/style.php:111

#0 wp-content/themes/betheme/functions/theme-head.php(803): include_once()

#1 wp-content/themes/betheme/functions/theme-head.php(483): mfn_styles_dynamic()

#2 MDE/wp-includes/class-wp-hook.php(292): mfn_styles_inline('')

...


Please how can i fix this issue?

Comments

  • Hello,

    Can you update the WP to the newest version and check if the problem persists, please?


    Thanks

  • edited October 2021

    Hello,

    Thanks for the reply.

    I just made WP update to 5.8.1, and the problem still persists.

  • Can you put your website online, please?

    I need to take a closer look at it.


    Thanks

  • Nope, i can't.

    Because the website ain't working. I can share you the stacktrace of errors below:

    html{ background-color: #FCFCFC; } #Wrapper,#Content, .mfn-popup .mfn-popup-content,.mfn-off-canvas-sidebar .mfn-off-canvas-content-wrapper,.mfn-cart-holder,.mfn-header-login, #Top_bar .search_wrapper, #Top_bar .top_bar_right .mfn-live-search-box{ background-color: #ffffff; } body:not(.template-slider) #Header{ min-height: 0px; } body.header-below:not(.template-slider) #Header{ padding-top: 0px; } /** * Font | Family ***** */ body, button, span.date_label, .timeline_items li h3 span, input[type="submit"], input[type="reset"], input[type="button"], input[type="text"], input[type="password"], input[type="tel"], input[type="email"], textarea, select, .offer_li .title h3 { font-family: "Roboto", Helvetica, Arial, sans-serif; } #menu > ul > li > a, a.action_button, #overlay-menu ul li a { font-family: "Roboto", Helvetica, Arial, sans-serif; } #Subheader .title { font-family: "Open Sans", Helvetica, Arial, sans-serif; } h1, h2, h3, h4, .text-logo #logo { font-family: "Open Sans", Helvetica, Arial, sans-serif; } h5, h6 { font-family: "Roboto", Helvetica, Arial, sans-serif; } blockquote { font-family: "Open Sans", Helvetica, Arial, sans-serif; } .chart_box .chart .num, .counter .desc_wrapper .number-wrapper, .how_it_works .image .number, .pricing-box .plan-header .price, .quick_fact .number-wrapper, .woocommerce .product div.entry-summary .price { font-family: "Arial", Helvetica, Arial, sans-serif; } /** * Font | Size & Style ***** */

    Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /Library/WebServer/Documents/MDE/wp-content/themes/betheme/style.php:111 Stack trace: #0 /Library/WebServer/Documents/MDE/wp-content/themes/betheme/functions/theme-head.php(803): include_once() #1 /Library/WebServer/Documents/MDE/wp-content/themes/betheme/functions/theme-head.php(483): mfn_styles_dynamic() #2 /Library/WebServer/Documents/MDE/wp-includes/class-wp-hook.php(303): mfn_styles_inline('') #3 /Library/WebServer/Documents/MDE/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #4 /Library/WebServer/Documents/MDE/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #5 /Library/WebServer/Documents/MDE/wp-includes/script-loader.php(2083): do_action('wp_enqueue_scri...') #6 /Library/WebServer/Documents/MDE/wp-includes/class-wp-hook.php(303): wp_enqueue_scripts('') #7 /Library/WebServer/Documents/MDE/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #8 /Library/WebServer/Documents/MDE/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #9 /Library/WebServer/Documents/MDE/wp-includes/general-template.php(3015): do_action('wp_head') #10 /Library/WebServer/Documents/MDE/wp-content/themes/betheme/header.php(21): wp_head() #11 /Library/WebServer/Documents/MDE/wp-includes/template.php(770): require_once('/Library/WebSer...') #12 /Library/WebServer/Documents/MDE/wp-includes/template.php(716): load_template('/Library/WebSer...', true, Array) #13 /Library/WebServer/Documents/MDE/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #14 /Library/WebServer/Documents/MDE/wp-content/themes/mde/page.php(10): get_header() #15 /Library/WebServer/Documents/MDE/wp-includes/template-loader.php(106): include('/Library/WebSer...') #16 /Library/WebServer/Documents/MDE/wp-blog-header.php(19): require_once('/Library/WebSer...') #17 /Library/WebServer/Documents/MDE/index.php(17): require('/Library/WebSer...') #18 {main} thrown in /Library/WebServer/Documents/MDE/wp-content/themes/betheme/style.php on line 111



  • Sorry, but my hands are tied until you work on a local host and do not put your website online, and I cannot help you.

    Notice that if you do not want to share your website publicly, you can send us a private message through the contact form on the right side http://themeforest.net/user/muffingroup#contact, and we will check what might be the reason.

    With a link to your website, please attach a link to this forum discussion.

    Thanks

  • Sir,

    How can you ask me to put a failing website online without giving me any potential solution to my issue.

    I can give you a remote access to my computer if you want but CAN'T put the website online sir because.

    The showed error seems to be an PHP error.

    Here you got the screenshots of raised errors:


  • You probably have 'px' put in the Betheme -> Theme options -> Fonts -> Size & Style.

    Like on the following screenshot:

    Please, go there, and check if you do not have it somewhere there. If you find it, please, remove it to have only a number, for example '15'.

    If you do not find it, then I will need a link to your website. Unfortunately, without it, your screenshots and explanation do not say much. Remember that you can enable under construction for your website, so no one will be able to access it, and turn it off for a while so I could check what might be the reason.


    Best regards

  • Hi Phil,

    I ain't any px in font size & style, ain't made any ajustement, but I still saved the config anyway. It seems that it reset my css fonts. because they seems losts now.

    This work, but raised another fatal error in my child theme's template page. This one was based on your old version (12.4). The raise error was :

    Fatal error: Uncaught Error: Call to undefined function mfn_builder_print() in /Library/WebServer/Documents/MDE/wp-content/themes/mde/page.php:25 Stack trace: #0 /Library/WebServer/Documents/MDE/wp-includes/template-loader.php(106): include() #1 /Library/WebServer/Documents/MDE/wp-blog-header.php(19): require_once('/Library/WebSer...') #2 /Library/WebServer/Documents/MDE/index.php(17): require('/Library/WebSer...') #3 {main} thrown in /Library/WebServer/Documents/MDE/wp-content/themes/mde/page.php on line 25

    Here's how the page.php looks :

    <div class="entry-content" itemprop="mainContentOfPage">

    <?php 

    while ( have_posts() ){

    //the_post_thumbnail( 'full' );

    the_post();

    mfn_builder_print( get_the_ID() ); }

    ?>

    </div>

    So, after a search for mfn_builder_print() function, i noticed that neither this function nor betheme/functions/builder/front.php file exists in your new version 25.1.1 and was both replaced by a new class betheme/functions/builder/class-mfn-builder-front.php which uses a function named Mfn_Builder_Front().

    These major changes are mentionned in you changelog.

    So i used a sample page and replace the above code with this: (Your tool blocks me)

    And this works now. But i want my fonts back. How can i retrieve them in the website?

  • What you ask for requires file customization that is not allowed in reference to the Item Support Policy. http://themeforest.net/page/item_support_policy

    So if you want to modify files and don't know how, you should contact your web developer. Item Policy says:

    Item support does not include services to modify or extend the item beyond the original features, style, and functionality described on the item page. For customization services that will help you tailor the item to your specific requirements, we recommend contacting the author to see if they privately offer paid customization services or checking out the great service providers on Envato Studio.

    Thanks

  • Yes, I know your support policy does not allow you to customize the files, and I never asked you to do so. And after reading many support cases of your theme, I noticed that this is what you repeat every time Betheme core files cause problems to customers.

    I would have hoped that you would have read carefully what I wrote, but no.

    What I said is that in your changelogs you don't mention any information about critical changes that have been made that can cause serious problems to an older version of Betheme. The famous change is that in the core files of betheme, you replace an important and basic function by another one, and don't provide a documentation about can users can deal with this change. That's my point.

    For the new issue on my fonts i'll create a new forum discussion. Because, what muffingroup calls 'support' is not at all a support, but just a forum discussion. Think that we paid for it !

    Sincerely.

  • Sorry that you felt treated unprofessionally.

    The changelog does not contain all the information you mentioned because updates, especially the recent ones, are huge, and the changes concern many files. Therefore, it is almost impossible to note every little change.


    Best regards

  • Sir,

    Firstly, it's not about how I feel. The FACT is that Muffingroup treated customers like me unprofessionally when their issues dealt with core functions of your product BeTheme. And i noticed it in many support cases in this forum.

    Secondly, as a developper, do you find it normal to change the name of a core and basic function, encapsulate it in a class, replace the file which defined it, and all those things without giving any update to customers? If so, I'm very concerned.

    Thirdly, be aware that a good and secure practice is to use a child theme instead of using the parent theme; and a child theme uses page templates AND core functions of the parent theme of course to get things done (for example to show blog posts). So if a core function of BeTheme causes a bug in a website, Muffingroup MUST assist customer to fix this issue even by a new Betheme update that fixes this issue. So tell Muffingroup to update their support policy.

    Then, tell Muffingroup to change their support tool, because this one, once again is not a support tool, that's a forum discussion. Here we can't have neither a ticket for case tracking, nor a privacy in our case monitoring, because in a forum discussion all thing are public.

    Finally, a company uses ALSO support cases to improve their products. And that's a very good way to show how much customers feedbacks are taken into account, a good way to build customer loyalty, and a very good way to build new releases that really reflects the real customers' needs.

    Hope that'll be useful four your company to read it.

    Regards.

Sign In or Register to comment.