Recently I moved to a new host, and since the move I am unable to save invoices, even with a fresh install of v4.5.50 using Softaculous. When I click the Save Draft button, inspector reports two errors:
500 for jquery.js (and lists the script as being located in the public folder and no such file exists in CP’s File Manager)
and
Uncaught TypeError for script.js (also appears to be looking for it in the public folder)
and the InvoiceNinja debugger says:
“[18:24:30] LOG.error: Uncaught TypeError: Cannot read properties of undefined (reading ‘errors’)
{“context”:“JavaScript”,“user_id”:7,“account_id”:“7”,“user_name”:“My Name”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36”,“locale”:“en”,“ip”:“0.0.0.0”,“count”:4,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“log_error”}”
It should be noted that these errors go away and I am able to save invoices if I disable ModSecurity for this subdomain. But is that really a good idea security wise?
I figured not so I tried migrating to v5.3.76. But then I get this error (and nothing is moved over):
Server error: POST https://invoice-ninja-number-5.mydomain.com/api/v1/migration/start
resulted in a 500 Internal Server Error
response: { “message”: “Server Error” }
I contacted the host for support, and they are just asking for specific server requirements for this application. So any help with either getting v4 to work safely, or better yet migrating to v5 successfully would be much appreciated.
Thank you!