[Support request] extra whitespaces in GeneratePress Child Theme

Home Forums Support [Support request] extra whitespaces in GeneratePress Child Theme

Home Forums Support extra whitespaces in GeneratePress Child Theme

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1640320
    Ree

    I have this issue when I try to do backup with UpdraftPlus, but I am not sure what I am missing. I added some code in functions.php :

    <?php 
    /**
     * Enqueue scripts and styles
     */
    
    function themeslug_enqueue_style() {
        wp_enqueue_style( 'my-theme', '/wp-content/themes/generatepress-child-theme/bootstrap/css/bootstrap.min.css', false );
        wp_enqueue_style( 'my-theme', '/wp-content/themes/generatepress-child-theme/bootstrap/css/woocommerce.css', false );
    
    }
     
    function themeslug_enqueue_script() {
       wp_enqueue_script( 'my-js', '/wp-content/themes/generatepress-child-theme/bootstrap/js/bootstrap.min.css', false );
    }
     
    add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_style' );
    add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_script' );
    
    // Change the Number of Columns Displayed Per Page
    add_filter( 'loop_shop_columns', 'lw_loop_shop_columns' );
    
    function lw_loop_shop_columns( $columns ) {
     $columns = 3;
     return $columns;
    }
    #1640690
    Ying
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can use the private information field.

    Thanks!

    #1641022
    Ree

    ok please check private info ๐Ÿ™‚

    #1641136
    Elvin
    Staff
    Customer Support

    Hi there,

    Can you specify which part of the site is having this issue? For us to have an idea which spaces are intended and which ones are not.

    Screenshots would be very helpful.

    Let us know. Thank you.

    #1641304
    Ree

    When I try to do a backup with UpdraftPlus, there is an error message :

    Warning: Your WordPress installation has a problem with outputting extra whitespace. This can corrupt backups that you download from here.

    After debugging I found out that GeneratePress Child Theme is causing that error because when I switched to GeneratePress Parent Theme the error is gone and I am able to do backup smoothly. I found an old thread that has the same issue but I couldn’t find anything.

    https://prnt.sc/xytufa

    #1641328
    Elvin
    Staff
    Customer Support

    Ah right that makes sense.

    Consider doing this:

    Since you’re already able to backup everything else except the child theme, you can back up the child theme separately by manually backing it up by copying it via FTP.

    You then just reupload it again incase you find it necessary. (reinstate a backup or migrate)

    #1641483
    Ree

    Thats what I am doing now, before backup I switched to Parent Theme and after backup switching it back to Child Theme but I was thinking how to solve the whitespace issue so my backup process will be streamlined.

    #1641526
    David
    Staff
    Customer Support

    Hi there,

    what code have you in your Child Themes functions.php ?

    #1641532
    Ree

    Only those codes that I posted in opening thread

    #1641542
    David
    Staff
    Customer Support

    Oops sorry missed that ๐Ÿ™‚

    Remove any unnecessary line breaks, and scroll to the end of each line of code and make sure there are no other spaces after the line. If there is delete them.

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