Error 500 migrating from v4 to v5

how do I set up and test email from the GUI in v5? I checked the .env file, and it was already set to log.
but might as well get it emailing properly. I set up the vars in the env file, but I don’t see where those same parameters would be set in the GUI… or how to test.
v4 had a section where all the email server stuff could be set - in Advanced Settings - System Settings - Email settings.
my v5 has an Email Settings section, but no place to enter server details.
Provider choices are Default, Postmark and Mailgun. How do I get the settings to show up?
Or failing that, how do I send a test email to see if it works with the parameters I put into the env file?

OK - despite no luck on the email thing, I attempted another migration today. And it succeeded! (I ended up just tailing the laravel log on the v5 machine)

I was able to get snappdf running on the machine and am happily generating those PDFs.

now - how do I get email working? I don’t actually want the machine to email anyone anything for now - but I do still want to know how to get it working in case I ever decide to make use of that feature.


You should only need to configure the mail server in your .env file:

If you prefer to use PostMark, or Mailgun, you can enter your API information in Settings > Email Settings

how do I test the settings? and/or see errors?
ah - nm re logs - I see it’s referenced in the article.
how do I send a test message>

Once you’ve configured the settings and refreshed the cache, try sending an email.

Then check either the activity tab on the dashboard, or the system logs.

If any errors are encountered they should be filled there, or if nothing, check storage/logs/laravel.log

actually - I notice now (that I am trying to start my first job of the morning) that a lot of data is actually missing from my v5 instance…
I am going to have to revert to v4. so - the migration reported success with a bunch of rockets. however, I see about half of my projects are missing and the total amounts for the lifespan of v4 don’t match t the totals reported in v5.
how do i figure out what the problem was, how do I fix it when migration didn’t even report there was a problem?
I will revert to v4 for now, as that is still working perfectly. so no emergency here, but ???
thanks for helping me troubleshoot this : )

One thing to check is that you have all data exposed. In Settings > User Details ensure ALL data is shown rather than just the last 3 years.

yea… that was it. now - I get that it makes sense to load only a subset of data to decrease the load on the server if it holds data for a bunch of years. but what is the point of hiding projects that have current tasks? I suppose that makes sense for situations where people do projects that come and go. but literally all of my projects are ongoing maintenance for clients. each client gets a project and it stays active forever. perhaps my scenario is unusual - but it shouldn’t be for any business that has lasting, ongoing service relationship with clients. maybe it would make sense for you to add a project type that stays “current” no matter what. perhaps differentiate in your project setup between ongoing and one-off projects. because it would be nice to be able to limit the amount of data invoice ninja loads by default as i am sure that will improve performance. right now - I guess I’d have to create new projects to have everything showing up correctly with a limited visibility per date. or does editing a project make it visible again in the limited scope?
I’ll re-do the migration.

actually, no… the more I think about it - this might be better considered a bug… because my v5 instance had existing tasks that belonged to projects created more than 3 years ago. and loading the tasks, in my opinion, should have loaded the projects automatically, no matter when they were created. it should cascade. this way the user is not responsible for manually ensuring the dependencies are loaded so to speak. if I created a task under a project that has been active for 10 years, the existence of that task should make invoice ninja consider the project and client (and any other related object required for proper functioning) active/current. i was literally seeing tasks that i knew were created for specific clients with no project assigned in the task list. that makes little sense, even hen the limit to past 3 years is on.

@hillel thoughts about making the 3yr limit an opt in setting?

also - in v4, I could sort tasks by date. i can’t seem to do that in v5. that’s limiting… it would be good to sort by client and date, at least

actually, if you sort out the object dependency thing - where loading a current task automatically loads whatever other objects that current object requires (client, project, whatever) - that would solve the practical issue and/or confusion. right now, I can;t turn the load only setting on until i;ve gone through and either edited or recreated all the projects for all the clients…

but thinking on it more, just resolving the dependency wouldn’t necessarily resolve making a new task for a project that didn’t already have a current task loaded. maybe instead it would make sense to have the ability to make certain objects always current. projects or clients maybe and only limit loading more transient, dated items like invoices, tasks and such. that’s probably a better approach.
I would look at all the db objects and consider their nature. nobody has an invoice that lasts 10 years, but clients and projects can. quotes, payments, invoices and similar objects always exist only for a particular time frame. if you break your objects down this way, then apply the date filter, things will make a lot more sense.