4e4b632298277071a67563b44d87468b341eae8b
What is the problem? Discourse core PR #36678 changes `topic.tags` from a string array (e.g., `["support", "bug"]`) to an object array (e.g., `[{id: 12, name: "support", slug: "support"}]`). This breaks the `TopicInGatedCategory#recalculate` method which checks if topic tags include enabled tags using `this.enabledTags.includes(t)`. What is the solution? Update the gated tag checking logic to extract the tag name using `typeof t === "string" ? t : t.name` before comparing against `this.enabledTags`. This ensures backward compatibility with both the old string format and the new object format.
discourse-gated-topics-in-category
This theme component allows site admins to show a login prompt that covers the topic contents in specific categories as a way to encourage readers to sign up and log in.
| 📖 | Learn More | https://meta.discourse.org/t/gated-topics-in-category/225454 |
| ❓ | Install Guide | How to install a theme or theme component |
| 🧠 | New to Discourse Themes? | Beginner’s guide to using Discourse Themes |
Languages
JavaScript
64.8%
Ruby
27.3%
SCSS
7.9%