Are there any changes to the CSS connection in the plugins?

AI-generated summary

The discussion revolves around issues with CSS connections in plugins after a recent update. Users report errors like undefined method 'find_plugin_css_assets' and undefined method 'topics' for nil:NilClass, indicating problems with plugin stylesheet loading. Stranik discovered that capital letters in the plugin folder name (e.g., Toxu-h → toxu-h) resolved the issue, suggesting case sensitivity is a factor. pfaffman identifies the Toxu-h plugin as the source of the problem. Falco explains that CSS now loads per plugin and skips disabled ones, referencing a recent change. Dev_Work confirms styles fail to load, showing 404 errors, and questions the correct way to register CSS assets. Dev_Work shares a screenshot of the issue. Stranik clarifies that capital letters in the plugin name cause the error, and Dev_Work confirms the fix works. Dev_Work adds that dots in plugin names (e.g., toxu.h) are also problematic, recommending hyphens instead.

Perhaps a local problem, but the css styles in the plugins did not connect.

latest-release +320

ActionView::Template::Error (undefined method `find_plugin_css_assets' for Discourse:Module) /var/www/discourse/app/views/common/_discourse_stylesheet.html.erb:15:in `_app_views_common__discourse_styl

Perhaps the case is in capital letters in the name of the plugin?


ActionView::Template::Error (undefined method `topics' for nil:NilClass) /var/www/discourse/plugins/Toxu-h/custom_views/list/list.erb:71:in `_plugins__oxu_h_custom_views_list_list_erb___43913933

It appears that plugin is causing the problem.

Like it was done with done with JS months ago, CSS now loads a file per plugin, and will not load the files for disabled plugins.

https://github.com/discourse/discourse/pull/7646

after this commit, styles does not display on the site net::ERR_ABORTED 404

i registring css

register_asset "stylesheets/styles.scss"
register_asset "stylesheets/common/custom-menu.scss"

like now?

In my case, the error was fixed by replacing the case of letters in the name of the plugin (folder). I don’t know why, but now capital letters are not perceived.

This was evident from this error.


ActionView::Template::Error (undefined method `topics' for nil:NilClass) /var/www/discourse/plugins/Toxu-h/custom_views/list/list.erb:71:in `_plugins__oxu_h_custom_views_list_list_erb___43913933

Toxu-h -> toxu-h

Thanks!
This variant works!

dots also cannot be use in the plugin name
toxu.h -> toxu-h or toxuh