Forbidden (403) iFrame when viewing invoice in client portal

Hi, after a lot of digging I’m finally up and running with Invoice Ninja, including the sending of emails.

However, the emails that are being sent with the invoices, include a button with a link to the client area (which seems to work fine, haven’t played too much with it yet). The issue is that the iFrame that is supposed to show the invoice, instead shows a 403 Error page.

The setup is selfhosted on GoDaddy with a Installatron automatic installation.

It seems the iFrame is trying to load MYURL/storage/xxxxxxxx, but when I edit the iFrame to load MYURL/public/storage/xxxxxxxx it seems to work…

Any idea?

Hi,

@david @ben any ideas?

@maximbroos

You may need to append /public to your APP_URL in the .env file so that the full path is correctly defined for PDFs to resolve.

I can confirm this is an issue on a fresh install in a sub-folder on my domain. I have the sub-folder listed in the APP_URL and I have tried adding /public to the end with the same result. It’s like a rewrite rule isn’t working and it’s trying to open the storage folder in the root directory and not the one in the public folder. It also fails with a 403 error when clicking on the three dots and trying to open the pdf invoice in a new tab.

The pdf invoices all seem to work fine in the admin interface.

If I comment out the .htacces file in the INSTALL_DIRECTORY/storage/ folder everything works like it should.

Also my install was scripted by Installatron service if that makes a difference.

The 404 pages do not use the APP_URL from the .env file so the return link on the 404 page is broken.

I’m not sure if you are still having this problem, but after you edited your .env file did you run yourdomain.com/update?secret=UPDATE_SECRET_HERE?
Also ensure your .htaccess file is correct.

If you are still having issues I would contact Installatron for further assistance.