Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1372515

    Hi
    I am running PHP 7.4, Apache 2.4 and need to upgrade toi 8.1 as Loopia my host is discontinuing support for 7.4 on the 28th of november 2022.
    Even if i turn all of my plugins and still the site is not available when uppgrading to 8.1. If i Switch back to 7.4 it is just fine…
    Please help!

    #1372526

    Hey marvin12,

    Thanks for the login details. Are you getting any error messages? Do you have server error logs which you could share with us?

    Best regards,
    Rikard

    #1372528

    No, where can I find them. I am a low tech person…

    I have now updated the site to PHP 8.1 now. Please visit http://www.gigla.se and you see what happens.

    Please let me know if you need me to get it back to 7.4

    #1372550

    Hi,

    You can reach out to your hosting provider to see if they can provide you with server error logs. I see that your site is returning a 500 internal server error, which unfortunately is very general and doesn’t give us any leads as to what could be causing it.

    Best regards,
    Rikard

    #1372551

    I have now changed it back to 7,4 as I need to have the site online.
    Thanks, Marvin

    #1372565

    Hi,

    Thanks for the update. Please provide us with server error logs if you should need any further help.

    Best regards,
    Rikard

    #1372630

    I was in contact with Loopia (my webb hosting entity) and they asked me to change in the wp-config file, Debug to true in stead of false. In PHP 7,4 mode i got this information:

    Notice: Undefined variable: vn in /www/webvol13/43/l8gbopo3ldp3k09/gigla.se/public_html/wp-content/themes/enfold-child/functions.php on line 74

    Notice: Funktionen wp_register_script anropades felaktigt. Skript och stilmallar bör inte registreras eller läggas i kö innan någon av åtgärds-hookarna wp_enqueue_scripts, admin_enqueue_scripts och login_enqueue_scripts har körts. Denna notis utlöstes av hanteraren gigla-custom. Mer information finns i Felsökning i WordPress. (Detta meddelande lades till i version 3.3.0.) in /www/webvol13/43/l8gbopo3ldp3k09/gigla.se/public_html/wp-includes/functions.php on line 5835

    Notice: Funktionen wp_enqueue_script anropades felaktigt. Skript och stilmallar bör inte registreras eller läggas i kö innan någon av åtgärds-hookarna wp_enqueue_scripts, admin_enqueue_scripts och login_enqueue_scripts har körts. Denna notis utlöstes av hanteraren gigla-custom. Mer information finns i Felsökning i WordPress. (Detta meddelande lades till i version 3.3.0.) in /www/webvol13/43/l8gbopo3ldp3k09/gigla.se/public_html/wp-includes/functions.php on line 5835

    #1372662

    Hi,

    Thanks for that. The problem seems to be coming from line 74 in your child theme, please check your code there.

    Best regards,
    Rikard

    #1372665

    How do I check this? Where, in what file is the line 74 and what should it say?

    To me it just a big questionmark as I do not know code.

    #1372672

    Hi,

    Sorry about that, line 74 in functions.php in your child theme. You can check it either via FTP, or under Appearance->Theme file editor in WordPress.

    Best regards,
    Rikard

    #1372675

    Thanks, what value should that line have?
    Would it be solved if I would do a re-installation of the theme?

    Thanks,

    Marvin

    #1372679

    Hi,

    The content in the child theme is not controlled or added by us, so I’m not sure why that code has been added. You can view the documentation here though: https://developer.wordpress.org/reference/functions/wp_register_script/.

    If you don’t need the code in your child theme, then you could remove everything which has been added to it. You might want to back it up locally first though, in case you should need it further on.

    Best regards,
    Rikard

    #1372680

    The line says in function.php line 74

    wp_register_script ( ‘gigla-custom’, ‘http://gigla.se/wp-content/themes/enfold-child/js/gigla-custom.js’, array(‘jquery’), $vn, true );

    <?php
    /* Child theme specific functions */
    /* Added by Maria */

    /* PT Sans: already in theme; 400/regular, 700/bold + italic */
    /* LOAD the following extra fonts:
    PT Sans Narrow: 400/regular, 700/bold
    PT Sans Caption: 400/regular. Not added: 700/bold.
    NOTE: Caption will only be used in explanation or image text,
    so it doesn’t need to be added to the styling panel.
    PT Serif: 400/regular, 700/bold. There are also italic normal, italic bold
    Serif can be used as paragraph font instead of sans */
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘chld_thm_cfg_ext1’, ‘https://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700&#8217; );
    wp_enqueue_style( ‘chld_thm_cfg_ext2’, ‘https://fonts.googleapis.com/css?family=PT+Sans+Caption&display=swap&#8217; );
    wp_enqueue_style( ‘chld_thm_cfg_ext3’, ‘https://fonts.googleapis.com/css?family=PT+Serif:400,700&#8217; );
    }
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    /* add Narrow to the styling panel – heading fonts */
    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘PT Sans Narrow’] = ‘PT Sans Narrow’;
    return $fonts;
    }
    /* add Serif to the styling panel – content fonts */
    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘PT Serif’] = ‘PT Serif’;
    return $fonts;
    }

    /* enable svg upload – use this only temporary, turn off after uploading */ /*
    function cc_mime_types($mimes) {
    $mimes[‘svg’] = ‘image/svg+xml’;
    return $mimes;
    }
    add_filter(‘upload_mimes’, ‘cc_mime_types’);
    */

    /* set to debug, useful to see shortcodes – use this only temporary */ /*
    add_action(‘avia_builder_mode’, “builder_set_debug”);
    function builder_set_debug()
    {
    return “debug”;
    }
    */

    /* Remove title pop-ups from links and images */
    function add_custom_tooltip(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘a’).removeAttr(‘title’);
    jQuery(‘img’).removeAttr(‘title’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_tooltip’);

    /* Register a custom jquery file */
    wp_register_script ( ‘gigla-custom’, ‘http://gigla.se/wp-content/themes/enfold-child/js/gigla-custom.js&#8217;, array(‘jquery’), $vn, true );
    wp_enqueue_script ( ‘gigla-custom’ );

    #1372686

    Thanks. That explains a lot. I had a person help me a few years ago that is not active anymore.

    #1372687

    Hi,

    Thanks for that. If you don’t know what is needed or not on the site, then it might be a good idea to reach out to the developer which added the code in question. If you want to debug this yourself, then you can try to remove all the code, then add one function back at a time to see when things start going wrong.

    Best regards,
    Rikard

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