Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoice rendering fails due to missing address #5405

Closed
mkllnk opened this issue May 12, 2020 · 0 comments
Closed

Invoice rendering fails due to missing address #5405

mkllnk opened this issue May 12, 2020 · 0 comments
Assignees
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. bugsnag

Comments

@mkllnk
Copy link
Member

mkllnk commented May 12, 2020

Description

Printing invoices or viewing an invoice can fails when a billing address is missing.
https://app.bugsnag.com/yaycode/openfoodnetwork/errors/5eb7b3af2d025e0017d4e8af

Also related to missing addresses:
https://app.bugsnag.com/yaycode/openfoodnetwork/errors/5eb771788be4b200171f8fb0

Expected Behavior

Every order should have a billing address. And if the address was missing, it shouldn't crash the site.

Actual Behaviour

Some orders are missing an address and it makes it impossible to view the invoice.

Steps to Reproduce

  1. ?

Animated Gif/Screenshot

Workaround

Refer to the invoice sent during checkout.

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used: 2.9.7

Possible Fix

We can make the invoice rendering more fail safe but the resulting invoice will lack the address. We then need to investigate why the address isn't there.

Error in OpenFoodNetwork

ActionView::Template::Error in app/views/spree/admin/orders/invoice.html.haml:36
undefined method `full_name' for nil:NilClass

View on Bugsnag

Stacktrace

app/views/spree/admin/orders/invoice.html.haml:36 - _app_views_spree_admin_orders_invoice_html_haml___171351979303221389_47117348228520
app/services/invoice_renderer.rb:3 - render_to_string
app/services/bulk_invoice_service.rb:13 - block in start_pdf_job
app/services/bulk_invoice_service.rb:12 - start_pdf_job
script/delayed_job:5 - <main>

View full stacktrace

Created by Maikel via Bugsnag

@mkllnk mkllnk added bugsnag bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. labels May 12, 2020
@sauloperez sauloperez self-assigned this Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. bugsnag
Projects
None yet
Development

No branches or pull requests

3 participants