Admin Authentication Sources pages show 500 error in some causes #8671

Closed
opened 2025-11-02 08:14:00 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @wxiaoguang on GitHub (Mar 9, 2022).

If there is an error occurs during add(new) (eg: duplicated name), then 500 error occurs during template rendering:

* template: admin/auth/new:17:68: executing "admin/auth/new" at <.type.Int>: can't evaluate field Int in type interface {}
* template: admin/auth/source/oauth:5:93: executing "admin/auth/source/oauth" at <.oauth2_provider.Name>: can't evaluate field Name in type interface {}

If the admin uses a duplicated name on the edit page, there is another 500:

* Error 1062: Duplicate entry 'aa' for key 'login_source.UQE_login_source_name'

In a word, the login source page is too complex and there are many bugs for edge cases.

Originally created by @wxiaoguang on GitHub (Mar 9, 2022). If there is an error occurs during `add(new)` (eg: duplicated name), then 500 error occurs during template rendering: ``` * template: admin/auth/new:17:68: executing "admin/auth/new" at <.type.Int>: can't evaluate field Int in type interface {} * template: admin/auth/source/oauth:5:93: executing "admin/auth/source/oauth" at <.oauth2_provider.Name>: can't evaluate field Name in type interface {} ``` If the admin uses a duplicated name on the edit page, there is another 500: ``` * Error 1062: Duplicate entry 'aa' for key 'login_source.UQE_login_source_name' ``` In a word, the login source page is too complex and there are many bugs for edge cases.
GiteaMirror added the type/bug label 2025-11-02 08:14:00 -06:00
Author
Owner

@Javonne-liu commented on GitHub (Mar 9, 2022):

I also reported an error of 500. How is this problem solved?

@Javonne-liu commented on GitHub (Mar 9, 2022): I also reported an error of 500. How is this problem solved?
Author
Owner

@zeripath commented on GitHub (Mar 9, 2022):

@Javonne-do please provide the issue number of that.

@zeripath commented on GitHub (Mar 9, 2022): @Javonne-do please provide the issue number of that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8671