Can't view any invoice in client portal - Livewire is not defined console error

It shouldn’t have /public at the end.
You should modify your web server host file to make sure the www docroot points to the /public folder, so you shouldn’t ever need to specify/public in the url
(It’s a huge security risk if your docroot isn’t pointing to /public; anyone could download the env file easily)

I understand, I have no access to the web server host file, so will try to figure this out.

How will this affect the livewire problem I’m having?
As it worked before, there seems to be no link to the public folder issue
Thanks for the help

I’ve had the same 404 issue in the client portal viewing invoices which drove me mad. I believe this occurs when there is a server or setup config error and too many redirects/loops resulting in a 404. For me it was hinging around Laravel/redirect.cgi I had many attempts to sort this and I’ve finally got it working great with no errors now.

Here’s my work around which may help if you’re on a shared server and no Shell access.

First take a backup of EVERYTHING if you need to restore existing data - that is a full MySql Database dump and a JSON backup via Invoice Ninja admin panel.

Do a fresh install. On shared hosting make sure you have the following enabled:

  • All required modules for Invoice Ninja. Chances are you won’t have the ‘PROC_OPEN’ module enabled as most providers will disable this on shared hosting. This should only be needed for Manual Installation. Install via Softaculous as this is the only method I found that will allow installation without proc_open. There should be a fairly recent version of v5.

  • PHP 8.1 (increase memory_limit in php.ini to 1028mb if you want to update via app)

  • MySql Database

  • SSL

  1. Install via Softaculous into a subfolder of your choice off root but no subdomain (Eg. https | | subfolder)
    This should complete without any errors.

  2. Then create a new subdomain (eg. invoices . yourdomain . com)

  3. Via control panel point the root path for your new subdomain to your installation folder using the absolute path with /public appended (eg. /home/username/public_html/subfolder/public)

  4. Open your .env file via FTP and change ‘APP_URL’ to your new subdomain (eg. With no /PUBLIC appended.

  5. Renew/update all SSL certificates for your subdomain.

  6. Now login to Invoice Ninja via: subdomain . yourdomain . com - not the Softaculous admin URL

  7. That’s it. If everything has gone well you shouldn’t see any errors. But be sure to check the client portal also for errors.

I then updated via the Invoice Ninja admin panel to the latest and all was good… but this may change your .env URL so keep eye on that.

1 Like