• Resolved user9876789

    (@user9876789)


    Hello, I’ve upgraded a site using this plugin to PHP 8 locally today – when I try to generate Invoices or Packing slips I get this error: Exception: UnableToOpenBlob ‘file:///Users/xxx/xxx/app/public/wp-content/uploads/2022/10/logo-pdf-e1666339869753.png’: No such file or directory @ error/blob.c/OpenBlob/3568 – this file does exist.

    Then in the log I have 2023-07-28T11:14:16+00:00 CRITICAL Exception: UnableToOpenBlob ‘file:///Users/xxx/Local Sites/xxx/app/public/wp-content/uploads/2022/10/logo-pdf-e1666339869753.png’: No such file or directory @ error/blob.c/OpenBlob/3568 (/Users/xxxx/Local Sites/xxx/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php:5709)

    Works fine on PHP 7.4. Have you seen this error before?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter user9876789

    (@user9876789)

    Before submitting this I also switched theme to Twenty Twenty Three

    Plugin Contributor Yordan Soares

    (@yordansoares)

    It is likely that you have updated your logo, and deleted the previous one, so your old invoices are triggering this error.

    The easiest way to fix this is to temporarily enabling the Test mode, under WooCommerce > PDF Invoices >General, but please note that this setting also override your shop name and address in those orders (if you have updated them, too).

    Thread Starter user9876789

    (@user9876789)

    I dont think it is that – I haven’t changed the logo. I use Local by Flywheel – if the site is set to PHP 7.4 and I try generate Invoice for the latest order, it works. I then switch to PHP 8.1, wait for it to apply, refresh, and then the error occurs. I flip back to 7.4, and it works fine again

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Sorry for the late reply, @user9876789.

    This is weird, because the error says “this file does exist”. This often happens on old orders, in which a PDF document was generated using a different logo that is no longer available in your site.

    That said, I would check the System Configuration, on WooCommerce > PDF Invoices > Status tab, to see if there is any PHP extension missing for that PHP version.

    As a side note, I use Local by Flywheel myself, and I do not have that issue in my environment. I have tested this with PHP 7.3.x, 7.4.x, 8.1.x, 8.2.x, and 8.3.x.

    Thread Starter user9876789

    (@user9876789)

    I’m just revisiting this one now – the settings already have test mode ticked (I didn’t change this it was always ticked). If I remove the image from Shop header/logo, it works. If I try a random image in the media library, it works.

    I tried resaving the image, renaming it, and reuploading it, it does the same as the original – errors out with Error trying to generate document: UnableToOpenBlob ‘file:///xxx/app/public/wp-content/uploads/2023/08/logo-pdf.png’: No such file or directory @ error/blob.c/OpenBlob/3568

    I found a totally different version of the logo, a new logo image and get the exact same error. I’ve looked at the status but everything’s green, is there some way I could send you this logo see if you have the same issue with it?

    Thread Starter user9876789

    (@user9876789)

    I’ve just tested this on the dev site and it’s working on there, just my local it’s not working on. I’m happy that it’s working on dev so I’ll close this off.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    I’m glad to hear that it finally worked, @user9876789.

    Let us know if you need anything else!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error on upgrading to PHP 8.1’ is closed to new replies.