Invoices not found from within the user account

Created on 7 April 2025, 19 days ago

Problem/Motivation

This is on D10.4.6, PHP 8.3.17, Commerce 3.0.1, Commerce Invoice 2.0-rc5, together with Commerce Registration 3.4.2 and Commerce Registration 3.4.0. The problem has been bugging me for over a year (not sure if I just didn't notice it before or if it appeared back then).

Going to /admin/invoices and viewing an invoice works nicely by clicking "view". This displays, e.g., for invoice 324,

/admin/commerce/invoices/324?language_content_entity=de

and it is possible to download the invoice with the "download" function, thereby evoking

/invoice/324/download?language_content_entity=de (the link has no prefixed /admin/)

However, if, as an admin, I go to the customer's user account and go to her/his "Invoices" view with a list of all generated invoices, the link name is the name of the invoice - for the example from above it is "R2025-034". This link should lead to /user/id/invoices/324 and retrieve the file - in this example, /private/R2025034-de-pending.pdf. Instead I get the message "The requested page could not be found."

Perhaps the reason is just a typo or slightly misnamed link? The maintainer of commerce_registration told me that it is not a problem because of some faulty interaction with the registration/commerce_registration modules (for event registration, as all the customers here are registering for events they are paying for).

Steps to reproduce

Run a regular install of commerce, commerce_invoice and registrations plus commerce_registrations, create an event for registration and have a user register for it. Go to the /admin/invoices page and in the Action menu click, e.g., on "download" whereupon the file starts to be retrieved. Stop the process without downloading the file and go to the username in the same list and click on it. Now the user account page is displayed. Click on "Invoices", then click the invoice name on the left of the list: The "not found" message appears.
(@maintainers: If this issue can be reproduced without event registrations, that's just fine. If it is a problem though that cannot be reproduced on your side without the event registration modules, just let me know if you would like to check out the problem in my testing environment first. This might save you the work of setting up the additional modules and an event for registration, at least initially).

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024