I upgraded to Discourse 3.5.0.beta6-dev (da0b303568) this morning.
After the update I was met with a red banner across the top of the site saying:
Admin notice: you’re using the discourse-add-groups-to-about theme component. This feature is now available in Discourse core. You should remove this theme component.
No, but I haven’t installed the component. Maybe that’s why the migration didn’t happen for me. But I wasn’t really interested because I don’t use the feature.
In fact, I follow the PRs on GitHub mainly because the screenshots help with translation, especially for features like this that are not available in the interface at first.
It’s in core, but the show_additional_about_groups setting is still a hidden site setting, so it’s not visible.
I think the migration enabled it for sites which used the component before. I am not sure if it will be enabled for everyone or simply be removed. I think it is only needed during the migration process.
If I have understood correctly, the idea is that the show_additional_about_groups setting is added to core. Then a check is added to the theme component so that the groups are only displayed if show_additional_about_groups is false. This means that it simply continues to work as before. Afterwards everything is built in core, but only displayed if show_additional_about_groups is true.
After the settings have been automatically migrated, show_additional_about_groups is activated. Now the code from core shows the groups and no longer the component.
This migration was added 3 days ago. Then 2 days ago the notice was added in the component that was displayed to you.
I don’t know why the migration obviously didn’t work for you (neither the settings were automatically applied, nor was show_additional_about_groups activated).
I think it is definitely an oversight that the global warning does not check whether the user is an admin.
I thought the migration should have moved @Richie’s configuration from the component to the core settings and should have also enabled the hidden site setting show_additional_about_groups. A reason why it didn’t work could be that he changed the name, because that’s easily doable in the interface.
Is there a reason why the migration relies only on the name instead of also checking for a component where the remote_url from the remote_themes table matches? That would catch renamed components as long as they were installed from the official repository.
The hidden site setting, which wasn’t enabled because the migration didn’t happen, prevented core from showing the groups, and instead, the component still showed the groups. But the global notice from the component told him to delete the component. Then core still didn’t show the groups because show_additional_about_groups was still disabled, and it wasn’t easily possible to enable it.
So if the automatic migration didn’t work, how do admins migrate manually? Copying the configuration isn’t the problem. But when do they switch between the component showing the groups and core showing the groups without needing to enable the hidden setting?
Maybe it would have been better to enable the show_additional_about_groups for everyone or show it in the interface before adding a notice to the component that it should be deleted. Then a manual migration would have worked, and core would show the groups afterward, so deleting the component wouldn’t leave admins without any groups on the about page.
Right now, when an admin adds groups to the about page extra groups site setting, nothing happens because the hidden show_additional_about_groups setting isn’t enabled. That feels like a bug, even though from a developer’s perspective, everything is working as expected. I think it would be easier for an admin to understand what happens if the setting were visible instead of hidden.
None of my settings were copied across, and when I did copy them the groups were still not visible on the /about page because the hidden setting prevented them from appearing and I had to use the Rails console to resolve the issue.
We used this hidden site setting in the process of porting over the theme component. Due to a problem with the migration it wasn’t enabled correctly when the data was migrated.
Now that the port is done, we don’t really need this setting any more as @sam pointed out. We can simply look at the list of configured groups.
Great! I thought it would have to stay until the next stable release to make sure that the component does not show the groups in addition to core for those who migrate then.