Invoice/Quote/Credit design templates missing

Hi all

Just finished setting up InvoiceNinja V5 on my Debian 10 VM, after many problems ive now got my V4 data migrated and the PDF view working.
Ive found another problem im stuck on and im hoping someone can help.

Under “Settings/Invoice Design” if i select Invoice Design or any other design list i get a empty list.
The templates must be there as viewing a invoice displays the default template design but i cannot select or change the design.

Anyone else had this problem?



Not sure… first time I’ve seen this, I suggest using this cURL request to check if the designs are being returned or not by the API

curl -X POST ‘
-H “Content-Type:application/json”
-d ‘{“email":"”,“password”:“Password0”}’
-H “X-API-SECRET:password”
-H “X-Requested-With: XMLHttpRequest”

it isn’t the first time.

Finally i made fresh install. Migration was a headache.


Im a API noob so bear with me:
when i run curl -X POST https://MYURL/api/v1/login?first_load=true&include_static=true
i get

    <title>Redirecting to https://MYURL</title>
    Redirecting to <a href="https://MYURL"></a>.
if i include -H “Content-Type:application/json” then i get

-bash: -H: command not found

Maybe you need to add /public in the URL

Now when i run curl -X POST https://InvoiceNinja_URL/public/api/v1/login?first_load=true&include_static=true -H “Content-Type:application/json”

i get

[1] 12791
-bash: -H: command not found
sys@in5:/usr/share/nginx/invoiceninja$ <!DOCTYPE html>
    <meta charset="UTF-8" />
    <meta name="robots" content="noindex,nofollow,noarchive" />
    <title>An Error Occurred: Method Not Allowed</title>
    <style>body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; }
.container { margin: 30px; max-width: 600px; }
h1 { color: #dc3545; font-size: 24px; }
h2 { font-size: 18px; }</style>
<div class="container">
    <h1>Oops! An Error Occurred</h1>
    <h2>The server returned a "405 Method Not Allowed".</h2>

        Something is broken. Please let us know what you were doing when this error occurred.
        We will fix it as soon as possible. Sorry for any inconvenience caused.
[1]+  Done                    curl -X POST https://InvoiceNinja_URL/public/api/v1/login?first_load=true


Try either removing the line breaks or adding \ at the end of each line

ive tried it as one command and still errors
curl -X POST https://MYURL/public/api/v1/login?first_load=true&include_static=true -H “Content-Type:application/json” -d ‘{“email":"SMTP_Email_Address”,“password”:“SMTP_PASSWORD”}’ -H “X-API-SECRET:INVOICENINJA_API_TOKEN” -H “X-Requested-With: XMLHttpRequest”

Ive also found the generated API token i generated has disappeared from the GUI

You would need to use your account email and password

Also, the quotes look incorrect (“ vs ")

tried with my login email address and password, also tried to run as sudo and normal user.

The strange thing is the API token i generated this morning has also disappeared as well

curl -X POST https://MYURL/public/api/v1/login?first_load=true&include_static=true -H “Content-Type:application/json” -d ‘{“email":"LOGIN_EMAIL”,“password”:“LOGIN_PASSWORD”}’ -H “X-API-SECRET:API_TOKEN_FROM_GUI” -H “X-Requested-With: XMLHttpRequest”

Can i check anywhere else for the Invoice/Quote PDF templates as im having no luck with the API

(Tried with and without /public/)

Do you see the token in the database?

I think the problem may be caused by the quotes.

Not sure how to check the MySQL db for this :slight_smile:
ive tried with single quote and double quote and no quotes
Silly question but am i right the API token is the one generated in the GUI under /Settings/Account Management/API Tokens

The /login route uses the email/password not the token.

Im still at a loss, do you think its worth building the V5 server again from scratch

Yes, it might be. This is the only report I’ve seen of this issue.

Rebuilt Debian VM that V5 was on and all the invoice/quote templates are now there :slight_smile:
Thank you Hillel for your help

1 Like

Glad to hear it, thanks for the update!