500 error on category view mobile due to knowledge base plugin

I just launched a new discourse site and just noticed (at least via mobile) that I can’t get to the categories list.

Unable to confirm if desktop is doing same thing at this time as I’m away from my computer.

Site is https://community.bcro.org in case link is needed to troubleshoot.

1 Like

Upon further investigation, this appears to be just related to mobile view.

2 Likes

I am finding the same problem when I open your site in mobile view. It even happens when I use safe-mode to open the site.

The errors I’m seeing in the console are:

GET https://community.bcro.org/categories.json 500
Error while processing route: discovery.categories

When I open the site in the desktop view, there are no errors on the categories page.

You can load the mobile view of your site on a desktop by going to https://community.bcro.org/?mobile_view=1. If you do this, and open your site’s error log page (Admin / Logs / Error Logs), you should see an error message that will give more details about what is going wrong. To filter the logs, deselect the Debug, Info, and Warning checkboxes from the bottom left of your logs page.

Let us know what you find in the logs.

1 Like

When I visit the site I see this.

StandardError (Attempting to access a non preloaded custom field, this is disallowed to prevent N+1 queries.) /var/www/discourse/app/models/concerns/has_custom_fields.rb:164:in `

And here is the backtrace.

2 Likes

That seems to indicate that the problem is with the discourse-knowledge-base plugin. You could try removing that plugin from your app.yml file, rebuilding the app, and see if that fixes the issue.

4 Likes

Will give that a try… that would be unfortunate as it was just working…

Thanks for the assist @Simon_Cossar. That has cleared it up. I will be disabling this plugin for the foreseeable future and searching for a new option.

2 Likes

There is a good chance that the problem with the plugin will be easy to fix. You should report it here: Knowledge Base Plugin.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.