Site logo

[Resolved] PHP Warning: Undefined array key “width”

Home Forums Support [Resolved] PHP Warning: Undefined array key “width”

Home Forums Support PHP Warning: Undefined array key “width”

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1592933
    Kevin

    Hey guys, happy holidays 😉

    Sorry to write your this, but the QueryMonitor Plugin gives me this output since some weeks and after Upgrading to PHP8 its inside my server error logfile. Any Idea how i can fix this?

    Best Kevin

    #1593488
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This means the logo you’ve uploaded isn’t getting the proper data from WordPress: https://github.com/tomusborne/generatepress/blob/3.0.2/inc/structure/header.php#L137

    Can you confirm that you’ve uploaded a regular image file in Customize > Site Identity?

    #1594139
    Kevin

    Hi Tom

    I uploaded a svg logo with the customizer – yes

    #1595109
    Tom
    Lead Developer
    Lead Developer

    Are you using a plugin to allow SVG uploads? If so, which one?

    Does the same issue happen if you upload a PNG?

    #1595434
    Kevin

    This one https://de.wordpress.org/plugins/safe-svg/

    Never tried a PNG. But i can 😉

    #1595919
    Tom
    Lead Developer
    Lead Developer

    Let me know if it happens with a PNG as well.

    We may simply have to check for those values in case WP can’t retrieve them from SVGs.

    #2239908
    Arun

    Hi team i also facing the same issue in header section, please help me to resolve that problem
    Site: https://marketplusacademy.com/

    Waiting for reply

    #2239911
    Fernando
    Customer Support

    Hi Arun,

    In Appearance > Customize > Site Identity, can you try re-uploading your logo?

    Can you also try uploading an PNG image?

    Kindly let us know how it goes.

    #2292705
    Paul

    Dear GP-Team,
    when I update PHP to 8.0 or 8.1 I get this error:
    Error in header

    I do use a SVG-Logo, but replacing it with a PNG did not help.
    Any advice, what I should do?
    Best, Paul

    #2292761
    David
    Staff
    Customer Support

    Hi Paul,

    can we site where the error occurs ?

    #2292790
    Paul

    Hi David,
    sure, that’s https://www.klingenbergverlag.at
    Best, Paul

    #2292810
    David
    Staff
    Customer Support

    Just to test its the same issue, can you swap the Logo and the Mobile Header Logo. I think its the latter causing the issue as that has empty width height attributes

    #2296044
    Paul

    Hi David,
    I added a different png to the Mobile Header Logo. Hope that helps solving the issue. Should I try updating php again?
    Best
    Paul

    #2296054
    David
    Staff
    Customer Support

    OK, so if i check the mobile header image then that has the width and height attributes now – which is good 🙂
    But the desktop logo:

    https://www.screencast.com/t/H45HRghan

    It is has the attributes but they are empty and i believe that is the issue.

    If you update the desktop logo as well, ( remove the Retina one as well ) and inspect the logo – if you see the width / height attributes have a value then you can try upgrading the PHP version

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