WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] Logo Not Displaying in IE (39 posts)

  1. mshingledecker
    Member
    Posted 6 months ago #

    I've seen a couple of posts on this topic but as a non-programmer the solutions suggested are a little over my head. Is there an easy way to address the logo not displaying on IE? I am using Network Solutions to host my WordPress site so I only have access to customize in the Dashboard menu.

  2. ElectricFeet
    Member
    Posted 6 months ago #

    Which version of IE? Link to site?

  3. mshingledecker
    Member
    Posted 6 months ago #

    http://www.ncmadulles.org

    I'm using IE 10.

  4. mshingledecker
    Member
    Posted 6 months ago #

    Here are the print screens using IE10 and Firefox. Note that in IE it does recognize something is there but it doesn't display it.

    IE10: http://www.ncmadulles.org/?p=1572
    Firefox: http://www.ncmadulles.org/?p=1573

  5. ElectricFeet
    Member
    Posted 6 months ago #

    Questions to try to pin it down:

    Does the logo show with the parent theme active?
    Can you see the logo here in IE10?
    Does it work if you use a jpg instead?

    Which were the solutions you saw? If they work, I can try to explain them better for you.

  6. mshingledecker
    Member
    Posted 6 months ago #

    Thanks for your help. Here are my answers:

    1. The logo doesn't show with the parent theme or child theme.
    2. I'll answer this tomorrow when I can access a PC with IE10.
    3. I've tried both jpg and png and neither one works. I resized the png file myself instead of having the theme do it thinking that might work. It didn't.

    Here are the posts I've found on this topic:
    http://wordpress.org/support/topic/logo-does-not-show-in-ie?replies=11
    http://wordpress.org/support/topic/ie-logo-permanent-fix?replies=5

  7. mshingledecker
    Member
    Posted 6 months ago #

    I can see the logo in the link you provided.

    Interestingly enough, I have checked with a few people who have IE11 and they can see the logo. Having said that I know others can't see it because they told me. I have not confirmed which version of IE they are running.

  8. mshingledecker
    Member
    Posted 6 months ago #

    I have asked around and it looks like people with IE8, 9, and 10 cannot see the logo. Everyone I have asked with IE 11 (about 5 people) can see it. Firefox and Chrome display it; Safari as well.

  9. ElectricFeet
    Member
    Posted 6 months ago #

    Could you try what d4z_c0nf suggested at the end of here: http://wordpress.org/support/topic/ie-logo-permanent-fix?replies=5 and report back?

  10. mshingledecker
    Member
    Posted 6 months ago #

    I don't know where to put this code? I don't have the ability to FTP files. I can only make changes via the WordPress dashboard.

  11. ElectricFeet
    Member
    Posted 6 months ago #

    We can talk you through tracking the problem down, but you really need FTP access or a file manager access through your control panel. Otherwise, you risk making a mistake and not being able to get your site up again from behind the scenes.

    Note that having FTP access is a good idea anyway, notwithstanding this problem. You may need it at some point in the future.

    I suggest you contact your host to find out how to access your site via FTP (you'll need a password--look in the documentation you already have) and then download a program such as FileZilla.

  12. mshingledecker
    Member
    Posted 6 months ago #

    The package I have from Network Solutions does not come with FTP capabilities.

    I am not a programmer nor do I fully understand all the coding that goes on behind the scenes to build a professional website. That is why I chose to use WordPress and themes. Given I am not the only one who has this problem, why doesn't the theme developer make the fix and update the theme accordingly? Will the fix "break" someone else's site that isn't having this problem?

  13. Cathy
    Member
    Posted 6 months ago #

    I'm having the same issue with EI9 not displaying the logo. I tried copying the code suggested by Electric Feet above into my functions.php, but it caused an internal server error. Where are we supposed to paste the code?

    For mshingledecker, I'm a new WP user as well and file transfers aren't that difficult. Your host support should be able to tell you how to access it. FileZilla is a free download and is not unlike the Explore option on your computer for managing and transfering files.

  14. ElectricFeet
    Member
    Posted 6 months ago #

    Sorry about that. The line numbers have changed in the meantime. If you're running version 3.1.20 of Customizr then the line numbers are 140-164 inclusive.

    And there was a typo in d4z_c0nf's code. The exact code should be:

    $logo_size    = '';
    //gets height and width from image, we check if getimagesize can be used first with the error control operator
    if ( @getimagesize($logo_src) ) {
        $logo_size = getimagesize($logo_src)[3];
    }
    ?>
    
    <div class="<?php echo $logo_class ?>">
    
        <?php
        do_action( '__before_logo' );
    
        printf( '<a class="site-logo" href="%1$s" title="%2$s | %3$s"><img src="%4$s" alt="%5$s" %6$s %7$s /></a>',
            apply_filters( 'tc_logo_link_url', esc_url( home_url( '/' ) ) ) ,
            apply_filters( 'tc_site_name_text', __( esc_attr( get_bloginfo( 'name' ) ) ) ),
            apply_filters( 'tc_tagline_text', __( esc_attr( get_bloginfo( 'description' ) ) ) ),
            $logo_src,
            __( 'Back Home' , 'customizr' ),
            $logo_size,
            ( 1 == $logo_resize) ? sprintf( 'style="max-width:%1$spx;max-height:%2$spx"',
                                    apply_filters( '__max_logo_width', 250 ),
                                    apply_filters( '__max_logo_height', 100 )
                                    ) : ''
        );

    Note that this is only a test, not necessarily a resolution. I know that d4z_c0nf's code (and thinking!) is better then mine, hence my request to see if his code works first.

  15. Cathy
    Member
    Posted 6 months ago #

    I tried the code above in my functions.php. I'm still not getting the logo in EI, but it messed up pages other than the home page--made them smaller and pulled left. I took it out again.

  16. ElectricFeet
    Member
    Posted 6 months ago #

    Ah, I see. No, not in functions.php. This is an edit of a core file to try to find out where the bug is. The file to change is class-header-header_main.php in the \inc\parts folder (I realise only now that this was mentioned only at the top of that thread).

    You need to copy the original class-header-header_main.php somewhere safe (on your PC, not in the server's folder (where a second copy could mess things up)). Then modify those lines with the above.

    If that doesn't work, then another possibility is as follows:
    - Put class-header-header_main.php back together again;
    - Comment out lines 141-143, so they become:

    // if ( @getimagesize($logo_src) ) {
    // 	list( $width, $height ) = getimagesize($logo_src);
    // }

    - Then modify lines 138 and 139 so that they contain the exact dimensions of your logo. So, for example, if your logo is 220px wide and 120px wide, lines 138 and 139 would be:

    $width = '220';
    $height = '120';

    In either of the above scenarios, if your logo displays, it will give us an important clue as to what is going wrong.

    After you've finished, report back and put the file back to its original state again.

    Thanks for helping!

  17. mshingledecker
    Member
    Posted 6 months ago #

    Cathy, thank you for working with ElectricFeet to isolate this issue. My non-profit won't pay for the extra charge Network Solutions will charge us for FTP access.

  18. Cathy
    Member
    Posted 6 months ago #

    Sorry this has taken so long, but what you ask is a stretch for my non-techie skills. Here's what I did.

    I downloaded Notepad++ so I could edit the file. I pasted a copy of the code above where I was supposed to and uploaded via FTP--nothing changed.

    Then I saved back to my original file and changed part of the code suggested. When I went to change lines 141-143, it seemed to me that they were the same as what was already there, except for the // which I think is for comments. So I changed the widith and height only.

    You asked that I make it the size of my logo. My logo is a PNG file and it is 1477x472. I thought this too big so I looked on the Customize drop down and the template has the logo forced down to 250x100 (I thought this was more inline with what was being asked in your sample above).

    With the second workaround, a logo did disply in EI on my wp-admin pages. I could see it in the header, although it was bitmaped (I'm not surprised going from 1477x472 to 250x100). If this is the work-around, do I use the 1477x472 number and will it size correctly? Although I could see the logo, my site had an internal server error--both in Chrome and in EI when I tried to visit it. Note, that the logo in Chrome still displayed correctly when the EI was bitmapped. So, I uploaded the original file once again and am still missing the logo in EI.

  19. ElectricFeet
    Member
    Posted 6 months ago #

    Thanks for all your help Cathy!

    Yes, you should use the full size of the image (width 1477 x height 472). And yes those lines were to be commented out.

    So let me get this right: you're saying that you add the width and height, but don't comment out lines 141-143 it works? Or are you saying you did comment them out?

    I'm a bit confused about how you managed to see the logo at the same time as an internal server error. Normally when I get an internal server error, the whole screen is blank apart from the message. What am I misunderstanding?

    Thanks again for your help.

  20. Cathy
    Member
    Posted 6 months ago #

    I made no change to the lines 141-143 because it seemed the same as the original to me. What does "commented out" mean? I thought you wanted me to replace the code with the new code you gave. To be clear, did you intend for me to remove lines 141-143? I only changed the width and height as you described.

    After I uploaded the new file, I could see the change on the wp-admin screen, but not when I went to visit the site. The site showed the blank screen with the error message as you say. But, to see the logo on the wp-admin screen was progress--there was no logo there before.

    So, let me know if I need to remove the lines 141-143 and use the proper pixel size for my logo and I will try again. If not, alos let me know and I'll wait for more of your advice.

  21. ElectricFeet
    Member
    Posted 6 months ago #

    Hi Cathy, thanks for this. Sorry for the delay in responding.

    By "commented out", I meant the addition of // at the beginning of the lines. In php, adding // at the beginning of a line tells the php processor to ignore the whole of the rest of the line (unless there's a ?> in it, which would switch off php). So the whole lines become comments.

    To sum up, what I was suggesting you do in your case, is change lines 138-143 to:

    $width  = '1477';
    $height = '472';
    //gets height and width from image, we check if getimagesize can be used first with the error control operator
    // if ( @getimagesize($logo_src) ) {
    // 	list( $width, $height ) = getimagesize($logo_src);
    // }

    If that works, then we will have established that it's the setting of the width and height variables though the function getimagesize that IE is somehow objecting to.

    I'd do this myself, if I had access to an old IE, but I don't. I can confirm that the above doesn't seem to break anything in other browsers, but it remains to be seen if it will fix the IE display on the front end.

  22. mshingledecker
    Member
    Posted 6 months ago #

    If you have this code on a public website I can verify for you. I'm running IE10 on my work laptop.

  23. ElectricFeet
    Member
    Posted 6 months ago #

    Thanks mshingledecker! OK. I have this live on darioalfonsi.com and not live on alfonsidario.it

    Could you tell me if you can see the logo on one site, but not the other? (The logo is just the name in a special/wide font.)

    To double check, do you have another browser you can also test? I'll leave this implemented until I hear from you.

  24. mshingledecker
    Member
    Posted 6 months ago #

    ElectricFeet, I checked both sites using IE10 and the latest versions of Firefox, Chrome, and Safari (all running Windows 7). In all cases I could see the logo. Having said that, I believe you asked me to check one of these sites before and I was able to see the logo in IE10 at that time which makes this more vexing.

  25. ElectricFeet
    Member
    Posted 6 months ago #

    It's frustrating for me too! :-)

    This bug seems to happen for some people, not all and tracking it down is really hard.

    Cathy's input is really helpful because she has FTP and IE to test.

    If you feel you want to be technically challenged, I could take you through how to do this on your own site (even without FTP), but it's dangerous, because a misplaced semi-colon could cut you off from your WordPress dashboard. (NS could get it back again for you, of course.)

    One way to do it would be to use the Solid Code Theme Editor, which allows you to edit any file in the theme. I just tried it and it seems to work well.

    But as I say, there's a downside in your case that you might have to contact NS and ask them to rename your Customizr folder if it goes wrong.

  26. Cathy
    Member
    Posted 6 months ago #

    With commenting out and using the correct logo image size I can see the logo on EI9 now. It took a little while for the home page to recognized it, but after refreshing a few times it was there. I do not get an internal error. However, the logo is still bit mapped. It looks perfect in Chrome. I left the modified file in my Customizer folder for now. Should I take it out?

    The other difference between EI9 and Chrome is the circles in the feature pages are squares in EI9 and circles (how I have it set and the default) in Chrome. I don't really care about this, but it may be another point of frustration for some people. A lot of old computers and less techie users still use EI.

    On another note, I could see the logo in EI in both websites you listed above. I love your site. I want a few of the chairs (probably cost a fortune). I want to learn how to put the comment box on the slider in the corner, add a rule above the pages and add a text box with a rule above the footer--another day!

  27. mshingledecker
    Member
    Posted 6 months ago #

    I have not encountered the square vs. circle issue.

    As a test, I downloaded the PNG from darioalfonsi.com and uploaded it to my site. The logo did not display in IE10.

  28. ElectricFeet
    Member
    Posted 6 months ago #

    Thanks mshingledecker, that's a really useful test. Knowing that my logo will display for you in IE10 when it's coming from my site, but not when it comes from your site tells me that there's something about some people's WP/site setup that stops the image being displayed and it's probably not related to the image itself. Very useful.

    Cathy, thanks for your boundless patience on this one :-)

    First as to your questions:

    - Border-radius doesn't work on IE8. The pictures will be square. This is a limitation of IE8 and there's no solution. However, on IE9 it should work well. Strange that it doesn't. However, I have found that in some cases it doesn't work on old versions of iOS either. It's just one of those things that we have to live with until people upgrade their browsers.

    - Thanks for the compliments on my site :-) For the slider, I use MetaSlider, but most of the slider formatting can also be achieved in Customizr's slider. Open new threads for each of the things you want to replicate and I'll help out.

    - The chairs are gorgeous aren't they? My next challenge is adding WooCommerce to the site (I'm entangled in all the bureaucracy / legal requirements for the moment), so you'll see the prices at some point in the next 6 months :-)

    Back to the problem at hand:

    We seem to have nailed it down to @getimagesize(), because when we take that out of the equation, the logo displays for you on IE9. But when @getimagesize() is in the equation, it doesn't display.

    I suspect that what is happening here is this:
    - The original code sets the width and height to nothing
    - It then uses @getimagesize() to get the width and height of the image
    - Something goes wrong in @getimagesize() (and this something seems to be peculiar to some people's setup, not the image).
    - @getimagesize() then returns some values that upset IE. In particular, IE is fussy if it gets 0px x 0px for the size of the image (whatever the CSS).

    Even if we set the sizes to the correct values before it is called, @getimagesize() overwrites the values with problematic ones.

    So the question then presents itself: What is @getimagesize() actually returning in your case?

    I have one last request to figure out what's going on here. Could you try this quick test? (If I were a super-programming guru, I would have had you do some fancy debugging, but I'm afraid that my knowledge extends only to rudimentary tools.)

    After the line that says:
    //gets height and width from image, we check if getimagesize can be used first with the error control operator
    could you add a whole new line containing:
    var_dump(@getimagesize($logo_src));
    This will print a line or two of information at the top of your site that looks something like array(6) { [0]=> int(1477) ... etc

    Could you copy and paste it here in backticks?

    I can then analyse what makes my case work and your case not work.

    Take that new line out of the code immediately after you copied and pasted what it outputs. It's only a temporary test to see what's going on and needs to be removed so visitors don't see that line of info. As to the other changes you made earlier (the specification of the exact size of the logo and the commenting out of the getimagesize function), I would suggest that you leave them there for now. After all, they make the logo display in old versions of IE. Next time you update Customizr, your changes will be overwritten, but I'm hoping this last test will give us a clue that I can then present to nikeo to resolve the issue. (Fingers crossed.)

    Thanks again for all your help.

  29. Cathy
    Member
    Posted 6 months ago #

    I added the line to the file and get the following message at the top of my site (both in EI and Chrome):
    'bool(false)'

  30. ElectricFeet
    Member
    Posted 6 months ago #

    Ah. OK. Well that explains why the logo doesn't show. In my case, it gives all the height and width info. Specifically for my logo, I get:

    array(6) { [0]=> int(880) [1]=> int(80) [2]=> int(3) [3]=> string(23) "width="880" height="80"" ["bits"]=> int(8) ["mime"]=> string(9) "image/png" }

    I've come to the end of my abilities to figure out what's going on here. I'll send nikeo an email asking him to look at this thread (this may take a week or more).

    For anyone who's just arrived at this thread, the workaround is to change the core Customizr code so that you set the width and height manually and comment out the @getimagesize function. That is, with something like this:

    $width  = '1477';
    $height = '472';
    //gets height and width from image, we check if getimagesize can be used first with the error control operator
    // if ( @getimagesize($logo_src) ) {
    // 	list( $width, $height ) = getimagesize($logo_src);
    // }

    on lines 138-143 of /customizr/inc/parts/class-header-header_main.php.

    Thanks for all your help Cathy!

Reply »

You must log in to post.

About this Theme

About this Topic