Hello,
Just updated to the latest Version.
When I go the Profile Page I get an 404 Error.
{"severity":"DEBUG","message":"API request result exception [EsE4K2J2]: Status 404: 404 Not Found\nUser not found [EsEZ6F0U], site SiteBrief(1,3xdn8p4r8j,Some(comments.dasnetzundich.de),Active), ip 109.40.128.89: /-/load-user-any-details?who=lars"}
Before I import an Backup from an Hosted Version.
- KajMagnus @KajMagnus2020-03-02 07:15:56.543Z
I think that's because the previous admin user which did the restore,
was missing from the dump file that got restored.This is because what's happening is a restore, not an import. Then, the current user (the one that does the restore), will disappear (unless it's present in the dump file that gets restored — but that's not your case, since you're restoring into a self hosted new server with had different database contents).
So when you go to the profile page, after having done the restore, that user (your user from before the restore) is not found.
You can do this: Open a new browser, e.g. Firefox if you use Chrome normally. And login with password as the new admin user. If that works, then you can continue logging in as that admin instead.
(Here you can see the username and email of the new admin user, i.e. from the dump file that got restored:
https://comments-for-dasnetzundich-de.talkyard.net/-/admin/users/enabled )The user that is missing (i.e. admin user from before the restore) — you can logout, in that browser. And you cannot login any more as that user, since that user is gone.
***
Tips: Let's say the admin that got restored, didn't have a password. Then you could instead have gone here:
https://comments.dasnetzundich.de/-/admin-loginand typed the admin email address. Then, Talkyard would send a one time login email, so you could login as that admin, and add a password (so that thereafter you could login via password).
And in case email hadn't yet been configured, you could do this:
sudo -i cd /opt/talkyard scripts/find-admin-login-link.sh
That script would look at the emails sent, and print the one-time login link.
***
I'm thinking all this is a bit confusing, to the one who does the restore (i.e. to you in this case). Talkyard could show some info dialogs about what's going to happen, and that one needs to logout, and login again, as the new admin user.
- H@Happyfeet01
Yes that was the old admin.. After logout, reload and sign in it works.,
But now i get an other Error when i try to save Settings.
https://paste.dasnetzundich.de/view/embed/5078b83d- KajMagnus @KajMagnus2020-03-02 08:51:21.060Z
That looks like a user interface bug. The UI shouldn't allow that combination of settings.
It seems the conflicting settings are:
- 1: Allow anonymous "login"
- 2: Require login and Approve users
Those settings 1 & 2 cannot be combined with each other. — I tried to reproduce this combination of settings, and save, but so far in my case the user interface did not let me configure these settings (so, worked as intended, in this case).
I'm wondering if you happen to remember which buttons and settings you edited and in which order? before you clicked Save. Then I can try that same thing.
If you disable (unckeck) Allow anonymous "login" ("guest" login),
then, I'd think the error will disappear.Or if you disable (uncheck) both Login required and Approve users.
(Here's the database constraint that says No to these settings:
settings_c_guestlogin_auth CHECK (NOT (
allow_guest_login AND (user_must_be_auth OR user_must_be_approved OR invite_only)))
- H@Happyfeet01
Hi,
I try to check Approve users but I get the same error. Allow creating local accounts is checked but not anonymous login.
- KajMagnus @KajMagnus2020-03-03 15:36:49.499Z
Thanks for the reply, I could reproduce this now:
Something went wrong: [DwE500EXC] org.postgresql.util.PSQLException: ERROR: new row for relation "settings3" violates check constraint "settings_c_guestlogin_auth" Detail: Failing row contains (1, null, null, null, t, t, null, null, null, ....).
Then I should be able to fix this now soon
- KajMagnus @KajMagnus2020-03-03 16:37:34.243Z
Hi again @Happyfeet01, I'm not 100% sure but seems I didn't remember to make Talkyard clear the in-memory cache, after a restore. I'll continue looking into this later today / tomorrow.
So Talkyard in-memory remembers the old site settings, and tries to save them, but the database has the new settings, causing this forbidden combination of settings.
If you want to, try with setting Allow guest login enabled, then save the settings. This should clear the mem cache.
Then, reload the page, and reconfigure the settings in the way you want.Alternatively, restart the Talkyard application server:
cd /opt/talkyard ; docker-compose restart app
.Or wait until I release a new version with a fix, later this week probably.
- H@Happyfeet01
Thanks. That works fine.. thanks for your work.