Email Template & Reminder Wrong $view_button and URL

Hi, Good day Everyone,

So the issues that im facing is on this location settings>Template & Reminder

When i insert $view_button into the email template for Quote, the preview shows and embed url for “Invoice” and not “Quote” as per picture below. As per attached is the screenshot of the said issues


Thanks for reporting this!

Do you know if the email is correct or if it’s also wrong?

cc @david

Dear @hillel the email seems to be display the correct display, but, when i click at view quote url, i have been greeted with

{“message”:“You are not authorized to view or perform this action”}

The invoice email display correctly and the view button when click did redirect and display properly.

So this issues only happened at the “quote”

Are you clicking the button in the preview or in the actual email?

The actual email sir.

And sir, i just found out im also unable to convert from quote to invoice through the back end.

I wonder why, well i guess im gonna try to fo fresh installation on other host to see if the issues persist.

Thanks for the info! cc @david

Does $view_link work correctly?

Are there any errors when converting the quote?

Hi, so i will try to break it down the best as i could to avoid confusion.

so my 1st issues is the email template preview issues.

So for this, the preview for quote are still wrong.

Your Question: How about the email?
Answer: On the real email, the button displayed correctly Quote and Invoice,

with quote button contain this url public/client/quote

with invoice button contain this url public/client/invoice

But when i click the “View Quote” button, it redirect me to the correct url but i got this error returned
{“message”:“You are not authorized to view or perform this action”}

And oh yea, 1 more thing, i also tried through Client Portal, i can go to “Quotes” but when i click “view” i got the you are not authorized error,

Your last question and my last mentioned issues, quote cannot convert to invoice

Answer: It seems it mistake on my end, the invoice may take time to generate, when i recheck again it just now has been generated.

Ermm how about this, maybe i can personally request your email so that i can put into the invoice system so that you can maybe see it in real time?

I dont mind because my live invoiceninja still at v4, at another url. So this one is fully for my own testing

@david any thoughts?

Sorry, we don’t access our user’s systems.

Not access like internal system, but like you test as customer side.

Anyway, i tried to check via developer console, and i saw theres 401 error, i dont know if this will help


Can you ensure your APP_URL in your .env file does not have a trailing slash.

Correct format should be


Hi, here how it look like in my env


this is exact copy, means that it also have those " things

Hi @david @hillel

For my case, i found the solution, though my solution might need invoiceninja to be reinstalled again.

So the solution for my case is change PHP version from ALT-php80 to EA-php80, now i dont know why or what differences between these 2. but it does solved my problem.