-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
Delete Account Fails: #1342
Comments
This is odd. You are on the master branch and you have the most recent commit. However, there has been a big re-factoring which changed the whole error handling. In particular, the legacy error message Do you have CLI access to your server? Can you confirm that your working directory is clean and in-sync with the upstream repository? At the moment I suspect a mismatch between the backend and the frontend version. |
Yes, I run my own Gentoo server.
|
Are you sure that the remote GIT repository you are pulling from is our GIT repo? The latest commit in your log is in April, but since then there have been a lot of other commits. The latest was only 4 hours ago by @qwerty287. Nonetheless, your GIT installation says "up-to-date". What is your configured remote repo? I believe |
Ahah.
Sorry... I guess I created a fork and forgot. |
Problem still exists in revised version. (I was sick, so I was unable to attend within the timeframe promised above.)
As of 5/25/2022 at 12:00 PM PDT, I was one commit behind, the commit being:
I restarted Apache:
Log shows:
Here's my attempt to look into the database, but I'm not familiar with foreign key constraints in the context of sqlite.
I'm wondering why there is not text in the log message following "caused by". Might this have to do with the presence of albums owned by the user that perhaps need to be deleted prior to deleting the user? Also, CASCADE on delete looks tempting, but I wonder how that might affect shared ownership, if there is such a principle in this scheme. |
Too bad. I thought I had found and fixed all places, but obviously I missed some. I will have a look into it the next weekend.
That's easy. The log is sorted in anti-chronological order with the most recent entry on the top. So you have to read the log from bottom-to-top. If you see a message which ends with "caused by", you have to read the message one line above. This is the message which caused the line below. In other words, the error message "User::delete failed" was caused by "Foreign key violation" which makes sense.
Exactly.
Please don't, because this way you might accidentally delete photos which you want to keep. My idea/solution was to re-assign ownership of all albums and photos to the admin user and then delete the user. But obviously I missed something. In the long-run it would be nice to offer a choice in the front-end which allows the admin to select whether all photos and albums of the user shall be deleted, too, or whether ownership shall be re-assigned. But I didn't feel like implementing this option into the frontend. |
The "works-for-me" will be that I have locked the account. Thanks. |
Please note that a locked user can still log into Lychee and use it normally. Locked users only cannot change their password. Hence a locked user is not comparable to a deleted user. |
Good point. I'll change the password which effectively locks the user out. Thank you. |
In the administrative interface, I am trying to delete an account and get an error "Server error or API not found"
Steps to reproduce the issue
Steps to reproduce the behavior:
Screenshots
Output of the diagnostics [REQUIRED]
Browser and system
Firefox 100.9.2 on Win7
The text was updated successfully, but these errors were encountered: