• Hello,

    I have WP 6.5.4, WooCommerce 8.9.2. and running PHP 8.1. Today I get this Fatal error log as follow:

    Jun 09, 21:20:07
    Warning: Undefined array key “width” in /home/SorryHidedmysite/SorryHidedmysite.com/wp-content/themes/twentyeleven/image.php on line 39

    Jun 09, 21:20:07
    Warning: Undefined array key “height” in /home/SorryHidedmysite/SorryHidedmysite.com/wp-content/themes/twentyeleven/image.php on line 40

    Stack Trace
    Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/media.php:795


    1. image_get_intermediate_size(325, Array)
      /home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/media.php:236

    2. image_downsize(325, Array)
      /home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/media.php:970

    3. wp_get_attachment_image_src(325, Array, false)
      /home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/media.php:1060

    4. wp_get_attachment_image(325, Array)
      /home/SorryHidedmysite/SorryHidedmysite.com/wp-content/themes/twentyeleven/image.php:104

    5. include(‘/home/mysite…’)
      /home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/template-loader.php:106

    6. require_once(‘/home/mysite…’)
      /home/SorryHidedmysite/SorryHidedmysite.com/wp-blog-header.php:19

    7. require(‘/home/mysite…’)
      /home/SorryHidedmysite/SorryHidedmysite.com/index.php:17

    8. {main}
      thrown in /home/SorryHidedmysite/SorryHidedmysite.com/wp-includes/media.php on line 795

    Please advise how to fix this issue. Hope you have a new update soon to fix this issue.

    Thanks in advance!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator jordesign

    (@jordesign)

    Hi @cfm168 could you please check for me if this error still occurs when you have no plugins activated on the site?

    Thread Starter cfm168

    (@cfm168)

    Hi @jordesign,

    Yes I tested and deactivated all plugins on the site, waited for a couple of days and check back, the same issue persists. Please help. Thanks in advance!

    Moderator jordesign

    (@jordesign)

    Hi @cfm168 – one thing else to try please… Could you please edit the page in question and make sure that all images within the page have a width set for them?

    Thread Starter cfm168

    (@cfm168)

    Hello Sir @jordesign,

    What do you mean “edit the page in question”? Which page?

    Thread Starter cfm168

    (@cfm168)

    Hello,

    Which file for the front page? I try to add image’s wide and high (width=”190″ height=”67″) in the elements. I can’t find the file to edit. Please advise. Thanks in advance!

    Moderator jordesign

    (@jordesign)

    Hi @cfm168 – that warning will be appearing in the logs because of an image that is inserted in the content of one of your pages that doesn’t have a width.

    You’d need to check the images in each of your pages and/or posts. Another way would be to turn on Debugging and you’d be able to see which page the warning appears on.

    But also – for what it is worth – as that is only a warning, and it is related to content in the site – it’s something you could choose to ignore.

    Thread Starter cfm168

    (@cfm168)

    Hi @jordesign,

    Which file name I can edit the code for the site’s logo on top front page? It seems missing width and height px.

    Moderator jordesign

    (@jordesign)

    Hi @cfm168 thanks for narrowing it down to that file. If you re-upload your site logo in the Customizer – do you find that makes a difference to the error?

    https://wordpress.org/documentation/article/customizer/#site-identity

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