Hello @KhoiUSA
Thanks, I merged an update: DEV: Migrate FA5 icons to FA6 by VaperinaDEV · Pull Request #25 · VaperinaDEV/discourse-guest-gate-theme-component · GitHub ![]()
Thanks for the update!
Hi there - we have attempted to install this component on a new Discourse instance however we receive an error when the modal is set to display:
The link is to this post.
Given the post is from 2023 it seems surprising that this update would be required for this component. So I’m wondering if we’ve done something wrong with our installation?
Hello
Can you remove the component and reinstall this: GitHub - VaperinaDEV/discourse-guest-gate-theme-component: Forced login / registration popup insired by Quora · GitHub to make sure you use the correct component?
Thanks for that. It’s working now!
That said, I’m struggling to update the text on the modal. I can update the title successfully but can’t seem to edit the main text. Am I editing the wrong fields?
Hello @Don Thank you for such a nice component. I see the intention (in fact the title) of the component is to be triggered by guest/anonymous users. Could settings for group or trust-level based conditions be added? I am trying to present a modal for logged in users who visit any topic in a specific category. This would compliment Discourse-subscriptions and category-lockdown.
Hello @Don
Thank you for the component. We use your plugin on the forum https://community.escapecollective.com/. But we have a problem: when setting the max_guest_topic_views parameter to more than 1 (in our case, 3), the modal window appears for a moment and then immediately disappears. I believe this is because Discourse performs a “soft” page refresh (Ember SPA routing) when loading JS, and at that moment the view counter is reset and the modal window disappears immediately. I think this happened after updating Discourse to version 3.5.0.beta9-dev. Please help me figure this out.

As one datapoint, I’m trying to repro this and unable to.
I’ve just updated to latest and this Theme Component seems to be working as intended.
Have you tried using it in a default theme?
@merefield Thank you for your reply, but yes, we are using the default theme. You can check it yourself at https://community.escapecollective.com/. Here is another video showing the problem:

Anything showing on your javascript console?
@merefield nothing
Hello ![]()
This looks like an issue with Topic Cards theme component. When you click the topic title it will force a full page load too which cause the issue here. If you open a topic with clicking somewhere outside the title than the Guest Gate can works normally because it won’t force a page reload, so only the SPA loading happens.
Please report the problem in the Topic Cards theme component topic.
Hello @Don
Yes, you’re right, if I disable the Topic Cards component, everything works as expected. I’ll write in the Topic Cards thread since we need both of these components.
Thank you!
Topic List Previews also has a wide format option for Tiles similar to Topic Cards … and it’s working with GG currently. Perhaps you can try that out whilst you wait for a fix to Topic Cards …
Hello everyone,
Thank you for the plugin, it works perfectly.
I just have one question: I haven’t seen any settings to center the title. Is that normal?
Super component
, I wanted to know if it was possible to insert line breaks or paragraphs in the custom_gate.little_text field
Thanks for your feedback
Hello ![]()
Yes, absolutely. Since custom_gate.little_text is rendered as htmlSafe, you can use HTML there. For example, you can use <br> for line breaks or <p> tags for separate paragraphs.
For example:
First line.<br>
Second line.
or
<p>First paragraph.</p>
<p>Second paragraph.</p>
Hello ![]()
Sorry for the delay.
Yeah, there is no setting for this yet but you can achieve this with a simple theme component.
.d-modal.gate {
.d-modal__title {
margin: auto;
}
}
Guest Gate 2.0 is coming soon! 
A new version of Guest Gate is currently in development, and this is a much bigger update than a simple version bump.
Version 2.0 brings a redesigned trigger system, a more modern implementation, significantly more customization options, and better compatibility with current Discourse versions.
New trigger system
The biggest change in 2.0 is that you are no longer limited to page views.
You can now choose how the Guest Gate should be triggered:
-
Page views - show the gate after a configurable number of page views
-
Time - show it after spending a certain amount of time on a page
-
Scroll - show it after the visitor reaches a configurable percentage of the page
-
Lightbox - show it when a guest opens an image
-
Any - allow multiple trigger types to trigger the gate
This makes it possible to create much more sophisticated guest-gating strategies.
New repeat behavior
You can now control what happens after the Guest Gate has been displayed:
-
Repeat trigger - show it again whenever the configured trigger occurs
-
Random page views - show it again after a random number of page views
-
Once per session - show it only once during the browser session
There is also a new configurable threshold for random page-view repeats.
The existing “Show only once” setting is still supported for backwards compatibility.
Delayed display
The gate can now be displayed with a configurable delay after a trigger fires.
For example, you can trigger the gate after 50% scroll depth but wait another 750ms before opening the modal.
This can make the experience feel much less intrusive.
More control over the modal
Version 2.0 adds several new customization options:
-
Compact, standard, or wide modal
-
Show or hide the modal title
-
Configurable title positioning
-
Improved responsive behavior
Improved Custom Gate
The Custom Gate has also received a substantial update.
You can now:
-
Add alternative (
alt) text to the custom image -
Better control the custom text content
-
Use HTML content in the custom little text field, including paragraphs and line breaks
-
Better control colors and spacing
The custom content is also handled more cleanly in the new implementation.
Modernized implementation
Under the hood, Guest Gate 2.0 has been significantly modernized.
The old implementation relied on the legacy plugin initializer, Discourse page tracking and jQuery-based lightbox handling.
2.0 now uses Discourse’s modern API initializer and page-change APIs, with a dedicated gate controller responsible for managing triggers, timers, scroll listeners, session state and modal state.
This also makes the component easier to maintain and extend going forward.
Existing installations are taken into account
One of the important goals of 2.0 was to avoid forcing existing users to manually rebuild their configuration.
The new version includes a settings migration that converts the old Guest Gate settings to their new equivalents.
For example, the old max_guest_topic_views setting is automatically migrated to the new page-view configuration and repeat behavior.
The old lightbox setting is also automatically mapped to the new trigger system.
So upgrading should preserve the behavior of existing installations as closely as possible.
Cleaner configuration
A number of existing settings have also been cleaned up and their descriptions rewritten to make the administrator interface easier to understand.
The Login / Sign Up, Discourse Connect, custom URL and button logic has also been reorganized internally.
What’s next?
Guest Gate 2.0 is currently being finalized and tested.
This release is intended to be a solid foundation for future Guest Gate features while giving administrators much more control over when, where and how the gate appears.
If you are already using Guest Gate, your existing configuration should be migrated automatically when upgrading.
Want to test v2.0 early?
You can try the branch here: GitHub v2.0 Branch




