-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated install to new server, throwing error on login #619
Comments
In your database, open the table If it's there, check if the rows in the table have a value in this row. If not, or when it's NULL, fill in the number 2. |
Alright, run the following commands to clear all caches and what-not:
Otherwise I have no idea, the code as far as I can trace it back includes the field you seem to be missing (hence the NULL). The error you post refers to a file in /views/twig/. The one with the long name. If the error persists, include this file as well if you would. |
Well that's good, Your stacktrace refers to a file in this directory: If the error occurs again, please post the content of this file too. |
I can't post the content of the file, as the file no longer exists. |
So the problem is fixed? |
No, I get the exact same error when logging in. |
The folder /storage/frameworks/views should be filled again. The stack trace will point to a (new) twig file. |
Here is the contents of the php file. |
Ok, I think I found it but I need your help to debug it. Find the file app/Support/Amount.php and go to line 262. Replace the content between the brackets (so between $cache = new CacheProperties;
$cache->addProperty('getDefaultCurrency');
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$currencyPreference = Prefs::get('currencyPreference', config('firefly.default_currency', 'EUR'));
$currency = TransactionCurrency::where('code', $currencyPreference->data)->first();
if (is_null($currency)) {
throw new FireflyException(sprintf('No currency found with code "%s"', $currencyPreference->data));
}
$cache->store($currency);
return $currency; If you are unsure what to do, this is what the function should look like. After you have done so, run these commands to clear the caches:
Then, try again. |
I downloaded the new Amount.php from the link you posted onto the server, ran the commands, and I get the same error. |
Alright, here's a version with a lot of debug commands. Replace the content of Amount.php with this version, and also open your Then, run the cache clearing commands again. When the error occurs again, the error in the log file should be preceded by a lot of debug information. Could you post that information? |
File was updated slightly just now. |
Sorry that I didn't get back to you earlier. I uploaded the new Amount.php, cleared the cache, and now I'm able to log in! Seems like whatever you did fixed it. I'm going to mess around with it this weekend and see if I run into any more problems. |
Try a hard refresh, clearing your browser cache. Depending on your previous version, you may have some old JS in your cache. |
Hello,
I recently migrated my Firefly install and database to another server, by exporting the database and importing it, and copying over the firefly directory from the old server to the new one.
When trying to log in, I get this message:
Type error: number_format() expects parameter 2 to be integer, null given
Full stack trace here:
https://gist.github.com/dfiel/7e1e3c0c708dfa8a007c3f692589e5a3
What would cause this?
Thanks,
dfiel
The text was updated successfully, but these errors were encountered: