• papisean

    (@papisean)


    Hello, my wordpress website is showing PHP fatal error

    Fatal error: Uncaught Error: Cannot use object of type WP_Error as array
    in /home/www/diplomaticwatch.com/wp-includes/media.php on line 260

    The previously uploaded media files are not loading up in the admin dashboard. See attached screenshot

    How can i possible fix this problem. I will appreciate your assistance

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Moderator James Huff

    (@macmanx)

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/themes/ and rename the directory of your currently active theme. Hopefully, this will force the default theme to activate and rule out a theme-specific issue (theme functions can interfere like plugins).

    Thread Starter papisean

    (@papisean)

    I deactivated all the plugins………… it was still showing the error

    I renamed the theme, so it can force the default 2024 theme…….it couldn’t load the default theme

    I changed the theme from the dashboard to default theme ……it was still showing the error

    I Changed the PHP version from version to PHP 8.2 and the recent PHP 8.3………it was still showing the error below

    Images in the media gallery wont display and it’s showing the error below…….i wish i could attach screenshot

    Fatal error: Uncaught Error: Cannot use object of type WP_Error as array
    in /home/www/diplomaticwatch.com/wp-includes/media.php on line 260

    Call stack:

    1. image_downsize()
      wp-includes/media.php:970
    2. wp_get_attachment_image_src()
      wp-includes/media.php:1060
    3. wp_get_attachment_image()
      wp-admin/includes/class-wp-media-list-table.php:456
    4. WP_Media_List_Table::column_title()
      wp-admin/includes/class-wp-list-table.php:1791
    5. WP_List_Table::single_row_columns()
      wp-admin/includes/class-wp-media-list-table.php:736
    6. WP_Media_List_Table::display_rows()
      wp-admin/includes/class-wp-list-table.php:1706
    7. WP_List_Table::display_rows_or_placeholder()
      wp-admin/includes/class-wp-list-table.php:1633
    8. WP_List_Table::display()
      wp-admin/upload.php:455

      And when i try to upload images to an article it shows the error below

      The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels.

      Please i need solution
    • This reply was modified 8 months ago by papisean.
    • This reply was modified 8 months ago by papisean.
    Moderator James Huff

    (@macmanx)

    WordPress is not yet fully compatible with PHP 8.3. Do you still have the same issue under PHP 8.1?

    Thread Starter papisean

    (@papisean)

    yes, it’s displaying error on PHP 8.1

    Moderator James Huff

    (@macmanx)

    Ok, from Dashboard > Updates in your Dashboard, click the “Re-install version 6.5.5” button.

    This will only reinstall the core files, it won’t affect any of your site’s content or configuration.

    Thread Starter papisean

    (@papisean)

    Thanks James

    I re-installed version 6.55 now as you have suggested. The error is still showing

    Fatal error: Uncaught Error: Cannot use object of type WP_Error as array
    in?/home/www/diplomaticwatch.com/wp-includes/media.php?on line?260

    Call stack:

    1. image_downsize()
      wp-includes/media.php:970
    2. wp_get_attachment_image_src()
      wp-includes/media.php:1060
    3. wp_get_attachment_image()
      wp-admin/includes/class-wp-media-list-table.php:456
    4. WP_Media_List_Table::column_title()
      wp-admin/includes/class-wp-list-table.php:1791
    5. WP_List_Table::single_row_columns()
      wp-admin/includes/class-wp-media-list-table.php:736
    6. WP_Media_List_Table::display_rows()
      wp-admin/includes/class-wp-list-table.php:1706
    7. WP_List_Table::display_rows_or_placeholder()
      wp-admin/includes/class-wp-list-table.php:1633
    8. WP_List_Table::display()
      wp-admin/upload.php:455
    Moderator James Huff

    (@macmanx)

    Interesting, line 260 shouldn’t be causing an issue on its own, especially on the front end: https://core.trac.www.ads-software.com/browser/tags/6.5.5/src/wp-includes/media.php#L260

    Is your file modified? Do you have any plugins you missed under the rarely used /wp-content/mu-plugins/ ?

    Thread Starter papisean

    (@papisean)

    we just noticed the error on the 30th of June.

    No file was modified on that day or prior to that day. I have disabled all plugins and theme to default. Still showing the error

    • This reply was modified 8 months ago by papisean.
    Moderator James Huff

    (@macmanx)

    There was also no WordPress release on June 30: https://www.ads-software.com/news/category/releases/

    Can you restore to a backup from June 29, or at least compare differences between the files?

    Thread Starter papisean

    (@papisean)

    I asked the hosting company to do a restoration to 28th of June yesterday, they did and the error was still showing.

    I then asked them to restore it back to the recent

    Moderator James Huff

    (@macmanx)

    It seems like your reply got cut off.

    Thread Starter papisean

    (@papisean)

    So till now the error is still showing.

    Please what else can i do to remove this error. Old images uploaded to the website are not displaying in the media area. Though they display on the website front end.

    Only the images uploaded from the 1st of July are displaying at the media area of the dashboard

    Moderator James Huff

    (@macmanx)

    Is the media issue new, or did that start when the whole problem started?

    Is there an available pre-incident backup? If you have multiple options, maybe try 1 or 2 weeks ago.

    threadi

    (@threadi)

    If I can still get involved:
    The error message indicates a problem with meta data of one or more images. You wrote at the very beginning that this only happened with the newest files. Can you provide the original files here if necessary? Importing an older backup should help in any case.

    You can also provide screenshots as described here: https://www.ads-software.com/support/forum-user-guide/block-editor/#adding-screenshots

    Thread Starter papisean

    (@papisean)

    @macmanx the only issue is the media file. every other thing on the website is working fine.

    There was no pre-incident event to my knowledge. Everything was working fine prior to 29th of June when my attention was brought to the issue of old images not loading up in the media segment. To even upload new images wasn’t working at that time.

    But now, new images can be uploaded. But old images are not loading up

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Fatal error: Uncaught Error: Cannot use object of type WP_Error as array’ is closed to new replies.