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

Error 500 when previewing the invoice in setup screen #5

Open
martignoni opened this issue Mar 11, 2023 · 0 comments
Open

Error 500 when previewing the invoice in setup screen #5

martignoni opened this issue Mar 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@martignoni
Copy link

An error 500 occurs when previewing the invoice specimen in the setup screen. The PDF works however correctly when creating an invoice using the invoice module.

Steps to reproduce:

  1. Install SwissQR module and activate it following instructions
  2. On Setup -> Modules/Applications -> Invoices, click the Preview icon
  3. Error 500 is displayed

Trace in error log:

2023/03/11 18:01:51 [error] 1893167#1893167: *1117659 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Sprain\SwissQrBill\DataGroup\Element\CombinedAddress::create() must be of the type string, null given, called in .../html/core/modules/facture/doc/pdf_swissqr.modules.php on line 928 and defined in .../html/core/modules/facture/doc/vendor/sprain/swiss-qr-bill/src/DataGroup/Element/CombinedAddress.php:54
Stack trace:
#0 .../html/core/modules/facture/doc/pdf_swissqr.modules.php(928): Sprain\SwissQrBill\DataGroup\Element\CombinedAddress::create()
#1 .../html/core/modules/facture/doc/pdf_swissqr.modules.php(860): pdf_swissqr->qrinvoice()
#2 .../html/admin/facture.php(112): pdf_swissqr->write_file()
#3 {main}
  thrown in .../html/core/modules/facture/doc/vendor/sprain/swiss-qr-bill/src/DataGroup/Element/CombinedAddress.php on line 54" while reading response header from upstream, client: 51.154.14.55, server: redacted, request: "GET /admin/facture.php?action=specimen&module=swissqr HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "redacted", referrer: "https://redacted/admin/facture.php?save_lastsearch_values=1&backtopage=%2Fadmin%2Fmodules.php%3Fsearch_keyword%3Dfac"

Context:

  • Dolibarr: 16.0.3
  • Nginx: 1.18.0
  • PHP: 7.4.33

PS. A big thank you for this (very useful) module ❤️

@benvia benvia added the bug Something isn't working label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants