The API or Plugin ERROR

AI-generated summary

yangxuan reported an error when clicking the API or Plugin button in Discourse, seeking help to resolve it. pfaffman advised checking server logs at /var/discourse/shared/standalone/logs/rails/production.log and providing more context. yangxuan shared PostgreSQL queries used via API, suspecting they might be related. After checking logs, yangxuan confirmed no backend errors but noted a frontend error shown in a screenshot. Lhc_fl requested more details: steps taken, visited URLs, console logs, and installed plugins, and suggested checking https://yourforum.com/logs for site logs. yangxuan provided additional screenshots showing the frontend error and logs related to plugins. Lhc_fl noted that the discourse-username-localization plugin is deprecated since Unicode username support is now in core, recommending its safe uninstallation. yangxuan thanked for the help and asked for clarification on the root cause of the frontend error (Error while processing route: adminplugins.index). Lhc_fl replied that the current logs are insufficient to determine the cause and asked yangxuan to expand and copy the console error log. yangxuan shared a screenshot and attached a console log file (community.mech-mind.com.cn-1724314264273.log.txt) for further analysis.

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.

community.mech-mind.com.cn-1724314264273.log.txt (173.3 KB)