• Resolved matthlk

    (@matthlk)


    Hi,

    i recently updated evolve lite to version 3.4.1. Because of broken Front Page Content Boxes I manually downloaded the fixed version 3.4.3 and installed it via ftp upload.

    Now, after changing the Header and footer Pattern (option under “Styling”) no pattern is shown anymore as a background in header/footer. I think it initially worked in 3.4.3 without changing the option, so maybe changing triggers the bug?

    Cleared Caches (WP Super Cache and Browser – tried different) so far. Other options of the theme work so far.
    Thanks in advance for your suggestions / help.

    Cheers,
    Matthl

Viewing 15 replies - 1 through 15 (of 19 total)
  • I think this is probably relevant to the issue. I have audited my page since the last update as it seemed to slow right down – and I am getting a 404 error – for none.png for selecting no pattern.

    I have tried selecting a pattern (pattern 7 it seems!) and I get the following 404, and there is no pattern; – so it seems it is looking in the wrong place.

    https://newalesgreenparty.org.uk/wp-content/themes/evolve/library/media/images/pattern/http:/newalesgreenparty.org.uk/wp-content/themes/evolve/library/media/images/pattern/pattern_7_thumb.png

    Hi,

    Please open up custom-css.php go to line 525 and find the following codes.

    .header, .footer {background-image:url(' . $template_url . '/library/media/images/pattern/' . $evolve_main_pattern . ');}

    and change to the following codes.

    .header, .footer {background-image:url(' . $evolve_main_pattern . ');}

    Thanks for spotting this bug.

    Thanks!

    Thread Starter matthlk

    (@matthlk)

    Hi Denzel,

    thanks for your help. Changed the code / replaced the line 525 with your suggested code, but still no pattern shown.

    Greets

    Matthl

    Hi Matthik,

    Please post your website url here.

    Thanks!

    Thread Starter matthlk

    (@matthlk)

    Hi,

    it’s https://met-mole.de. Your suggested code change is still active in custom-css.php.

    Thanks!
    Matthl

    Hi,

    I can see in your web page source code, the code within dynamic css file is wrong. Please see screenshot. https://prntscr.com/83o40x

    I think you have copied my code from this thread and pasted into your editor, but the quote is decoded into HTML entities, and not parsed properly as PHP code.

    You need to use a proper code editor to edit your theme file, not a normal text editor.
    And you also need to clear your wp super cache’s cache files after updating theme.

    Thanks!

    The PHP variable is not suppose to show up as text in the dynamic css file.

    Thread Starter matthlk

    (@matthlk)

    Hi Denzel,

    thank you very much for your support! It’s working fine now.

    I copied the code from the follow-up post notify mail in my mail client. Didn’t realize the decoded quotes. :-/

    Matthl

    Hi,

    Glad to here it worked for you.

    Thanks!

    Hi Denzel,

    I tried your solution and it worked fine as long as a “Header and Footer pattern” is not ‘none’. Then this IF does not match ‘none’ and it displays the actual image “none.jpg” instead of leaving the background blank.

    if ( $evolve_main_pattern != ‘none’ ) {…

    The only workaround I have found is to reset all section parametres so that there is nothing selected. Then CSS requires the following image

    background-image: url(pattern_8.png);

    that is not found and the background is left blank.

    However, how could it be fixed so that when no Pattern is selected, no background image is displayed?

    Thanks

    David

    Hi,

    You can change the if check to include checking for no value.

    if ( $evolve_main_pattern != "none" && $evolve_main_pattern != "" )

    Thanks!

    Thanks for your quick answer Denzel!

    However I am sorry but this does not work. Probably because in line 12 of custom-css.php if there is no set option it recovers pattern8 as its default value.=>

    12: $evolve_main_pattern = evolve_get_option( ‘evl_pattern’, ‘pattern_8.png’ );

    My guess is that line 12 should be replaced with the value that the user will select if he chooses no pattern, as follows:

    $evolve_main_pattern = evolve_get_option( ‘evl_pattern’, $imagepathfolder . ‘/header-two/none.jpg’ );

    And then line 524 replaced with:

    if ( $evolve_main_pattern != ” && $evolve_main_pattern != $imagepathfolder . ‘/header-two/none.jpg’ )

    But it is not actually working… and I do not understand why.

    Thanks

    David

    Hi

    For anyone interested, the solution above was correct except that it required imagepathfolder to be filled before line 525.

    So the fixing is

    Line 12:
    $evolve_main_pattern = evolve_get_option( ‘evl_pattern’, $imagepathfolder . ‘/header-two/none.jpg’ );

    And Lines 522-526

    $imagepathfolder = get_template_directory_uri() . ‘/library/media/images/’;
    if ( $evolve_main_pattern != $imagepathfolder . ‘/header-two/none.jpg’ ) {
    $evolve_css_data .= ‘
    .header, .footer {background-image:url(‘ . $evolve_main_pattern . ‘);}
    ‘;
    }

    Thanks

    David

    Just recently, I’m being bombarded with 404 errors involving “pattern_8.png”. My site is lifesskillsa.com and the errors include every page on my site, one example being https://lifeskillssa.com/contact-us/pattern_8.png. After reading Denzel’s proposed solution, I opened up my custom-css.php file and found a message within the code: I’m posting that section here

    //@since 2.0.2 mod by denzel
    //do not remove the extra slash, it’s a folder path mistake in option-init.php at line 806, try to fix now will cause problem to users.
    $none = $evolve_template_url . ‘/library/media/images//header-two/none.jpg’;
    if ( $evolve_main_pattern != $none && ! empty( $evolve_main_pattern ) && @getimagesize( $evolve_main_pattern ) ) {
    //fix it here, remove the extra slash, before we produce background image url.
    $evolve_main_pattern = str_replace(‘images//’, ‘images/’, $evolve_main_pattern);
    $evolve_css_data .= ‘
    .header-pattern,
    .footer {
    background-image:url(‘ . $evolve_main_pattern . ‘);
    }
    ‘;
    }

    I also started getting 404 errors from several webpages, but replacing “pattern_8.png” with these png names:
    apple-touch-icon-120×120-precomposed.png
    apple-touch-icon-120×120.png
    apple-touch-icon.png
    apple-touch-icon-152×152-precomposed.png
    apple-touch-icon-152×152.png
    apple-touch-icon-precomposed.png

    I’m totally inexperienced in editing code, so I did nothing. Can someone help, please, so restore my sanity?

    just visit the Customize or Theme Options page and click Save changes button

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Header and Footer pattern not showing up’ is closed to new replies.