As an administrator, I clicked on the API or Plugin button and encountered an error. How can I resolve it?
You’ll need to say more about what you did. Also see the logs on the admin page. There sew also logs on the server at /var/discourse/shared/standalone/logs/rails/production.log
I wrote the following query statement using PostgreSQL, then called the PostgreSQL statement with an API, and when I clicked those two buttons, an error occurred.
SELECT
u.username,
g.name AS group_name
FROM
Users u
JOIN
Groups g
ON
u.primary_group_id = g.id
WHERE
u.username = ‘yangxuan’
SELECT
username,
array_agg(id) AS ids
FROM
Users
GROUP BY
username
HAVING
COUNT(id) > 1;
I checked the log file and found no errors, but there was an error in the front-end, as shown in the figure below. I don’t know if it’s related to this?
Can you share what steps you took, which URL you visited, what logs are in the console? What plugins did you install, which third-party plugins?
After the error occurs, try going to https://yourforum.com/logs
to view the site logs. The latest log may reveal why the error occurred. Copying it here will be more helpful.
Currently, when clicking on Plugin or API, an error appears in Figure 1. The logs circled in Figure 2 are related to the plugins.
discourse-username-localization should have been depreciated. Support for unicode usernames is now in core (see Unicode usernames and group names ), so you should be able to uninstall it safely.
Okay, thanks a lot for your help. What exactly caused this front-end error (Error while processing route: adminplugins. index)?
It is impossible to be sure based on the existing logs. Can you try to expand the console error log and copy the contents here?
The following file is from the console and the format is a bit messy, so I took a screenshot.