Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #1487005

    Hello,

    I recently upgraded the PHP version to 8.3 (from 7.4) and I received the “fatal error” message. I copied the message in the private content. In fact I was not able to log in to my WordPress dashboad. I also tried to restore my site but that didn’t work and made it worse—site completely crashed. I had to revert back to PHP 7.4 to get the site back up and running. I’m currently using Enfold Child theme 7.1.1. and WordPress 6.8.2. After reading several threads, I assumed that the Enfold theme was compatible with 8.3. But that doesn’t seem to be the case.

    I contacted my hosting provider and they said the theme was not compatible with PHP 8.3. Please advise what to do. I need to upgrade the PHP version so I get the security updates. I haven’t tried upgrading to 8.2 or 8.1.

    #1487007

    I have now updated all of my installations to PHP 8.3 or higher. Some of my customer providers already offer PHP 8.4. I have never had any problems switching. Therefore, I assume there is high compatibility with current PHP versions. My overloaded test site runs under PHP 8.4.7. For example, the child-theme functions.php has over 5,000 lines, and the quick CSS is already over 9,700 lines long. (webers-testseite.de).

    Why don’t you try going back to smaller PHP versions one at a time? It may take a while for this to take effect. Then, see if your installation works with your provider.

    #1487010

    Hi,

    The error messages are referring to code your child theme. Note that we don’t provide any code for child themes, that is added by users as they see fit. You could try to temporarily rename the child and try to login after that.

    Best regards,
    Rikard

    #1487080

    Guenni007,

    Thanks for the recommendation. I may try upgrading to an earlier PHP version and see what happens. Appreciate your help.

    #1487081

    Rikard,

    I’ve upgraded PHP before in the past with no problems using the child theme. So don’t understand why now there’s a conflict with the child theme. I’m not a developer so not sure if I am capable of tweaking it.

    So to rename the child theme, which file do I rename? Do I do that before I upgrade to PHP 8.3…..or after? And once I login, do I rename it back to original? Thanks for your help.

    #1487088

    Hi,
    The error message says it is on: /enfold-child/functions.php on line 32
    The theme editor shows line numbers, can you look for line 32 and remove that code block?
    It might be in a snippet that starts above 32 and after, so remove the whole snippet.
    If you are not sure, add a admin login to the Private Content area so we can look.

    Best regards,
    Mike

    #1487137

    Hi Mike,

    I added the login info to the private content. I tried upgrading to PHP 8.0 and got this error code which crashed the site again. I believe it’s the same code as before. (ended up reverting again back to 7.4). Thanks,

    An error of type E_ERROR was caused in line 32 of the file /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-content/themes/enfold-child/functions.php. Error message: Uncaught Error: Undefined constant “THEMENAME” in /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-content/themes/enfold-child/functions.php:32
    Stack trace:
    #0 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-content/themes/enfold-child/functions.php(32): avia_nav_menus()
    #1 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-settings.php(695): include(‘…’)
    #2 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-config.php(103): require_once(‘…’)
    #3 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-load.php(50): require_once(‘…’)
    #4 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-admin/admin-ajax.php(22): require_once(‘…’)
    #5 {main}
    thrown

    #1487143

    Can you see your child-theme functions.php on: Dashboard – Appearance – Theme File Editor ? click on the right side the “Theme Functions” functions.php and see what is the content on line 32 and following.

    May be you post that block you have entered there.

    #1487154

    Hi,

    Thanks for that. The Appearance->Theme File Editor option is turned off on your installation, so we cannot access the child theme files. Please post FTP login details in private as well. If you want to rename the child theme, then you can login via FTP, then navigate to the wp-content/themes folder, then rename the child from there.

    Best regards,
    Rikard

    #1487162

    Hi,

    That’s strange that I can’t see the theme file editor. I have been able to view it before. I’ve posted the FTP details in the private. If you can help figure this out, I’d appreciate it. Thanks.

    #1487181

    Hi,

    Thanks for that. The FTP details are working, but all the folders are empty. If you are unsure about which user/details to use, then please reach out to your hosting provider for help with that.

    Best regards,
    Rikard

    #1487253

    Rikard,

    Sorry about that. I posted the correct details in the private content area.

    #1487254

    Also, the theme file editor is turned back on. I’ll try to copy and paste the code on line 32.

    #1487262

    Hi,

    Thanks for that. The FTP account still lead no where, but I checked via the file editor instead. this is what’s on line 32 in your child theme:

    avia_nav_menus(); function avia_nav_menus() { global $avia_config, $wp_customize; $avia_config['nav_menus'] = array( 'avia' => array('html' => __('Main Menu', 'avia_framework')), 'avia2' => array( 'html' => __('Secondary Menu <br/><small>(Will be displayed if you selected a header layout that supports a submenu <a target="_blank" href="'.admin_url('?page=avia#goto_header').'">here</a>)</small>', 'avia_framework'), 'plain'=> __('Secondary Menu - will be displayed if you selected a header layout that supports a submenu', 'avia_framework')), 'avia3' => array( 'html' => __('Footer Menu <br/><small>(no dropdowns)</small>', 'avia_framework'), 'plain'=> __('Footer Menu (no dropdowns)', 'avia_framework')), 'avia_responsive' => array( 'html' => __('Responsive Menu <br /><small>(If set will replace your main menu on mobiles)</small>')) ); add_theme_support('nav_menus'); foreach($avia_config['nav_menus'] as $key => $value) { $name = (!empty($value['plain']) && !empty($wp_customize)) ? $value['plain'] : $value['html']; register_nav_menu($key, THEMENAME.' '.$name); } } add_action( 'ava_after_main_menu', 'enfold_customization_add_responsive_menu' ); function enfold_customization_add_responsive_menu() { echo "<nav style = 'display:none;' class='main_menu_responsive' data-selectname='".__('Select a page','avia_framework')."' ".avia_markup_helper(array('context' => 'nav', 'echo' => false)).">"; $avia_theme_location = 'avia_responsive'; $avia_menu_class = $avia_theme_location . '-menu'; $args = array( 'theme_location' => $avia_theme_location, 'menu_id' => $avia_menu_class, 'menu_class' => 'menu av-main-nav', 'container_class' => $avia_menu_class.' av-main-nav-wrap'.$icon_beside, 'fallback_cb' => false, 'walker' => new avia_responsive_mega_menu() ); wp_nav_menu($args); echo '</nav>'; }

    What exactly is the purpose of that?

    Best regards,
    Rikard

    #1487298

    Hi Rikard,

    Hmmm. Not sure what’s going on with the FTP. I’m able to gain access. But glad you could read the file editor. I’m not sure what the purpose of that it. Something with a navigation menu? Your guess is as good as mine:) Should I try to delete it? I’ll do a back up first in case it breaks the site.

    #1487311

    Hi,
    I recommend removing this entire line or place this “//” at the beginning to disable it, if your site crashes you can log in to your FTP and remove the “//”, but I don’t think that it will.
    But I don’t want to try without FTP access.

    Best regards,
    Mike

    #1487361

    Mike,

    I was able to disable that line of code with your suggestion. Thanks!

    Also, I tried upgrading to PHP 8.3 and it worked!!! Thanks all for your help!

    #1487381

    Hi,

    Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Site crashed when upgrading to PHP 8.3’ is closed to new replies.