Jump to content

Invoices cached without customer data


Recommended Posts

Posted

I encountered an issue where invoices are being cached without the customer data, causing the PDF to be missing the customer name and address. I noticed some warnings on the log about billing being undefined in the invoice, which seems to be the root cause of the problem.

I can consistently reproduce it by: as a customer, ordering a service, paying for it and immediately going back to the customer dashboard and selecting view and then downloading the invoice. It does not happen when I directly download the invoice without viewing it first.

If I delete the cached version on the disk and then just download the invoice, it gets generated and cached properly.

I have proforma invoices and invoice caching with PDF+JSON enabled.

Versions:
Blesta: 5.11.2
PHP: 8.3
MySQL: 8.0
OS: Debian Bookworm

There is a cache file for a broken invoice attached, as well as the logs.

broken.json general-warning-2025-05-26.log

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...