Skip to content

Conversation

@n7studios
Copy link
Contributor

Summary

This PR fixes an issue where the data-kit-limit-per-session attribute was always being set to true when rendering the non-inline global form. It should correctly reflect the configured setting (true or false).

As a result, the ck_non_inline_form_displayed cookie was also always being set, since setting data-kit-limit-per-session to boolean true or false caused the related JavaScript to trigger unconditionally. This has been resolved by outputting data-kit-limit-per-session as 1 or 0, updating the JS selector accordingly.

This did not break overall functionality (since is_script_output_limited_by_session was always run to check whether all or one form should be output). However, this update ensures the logic and behavior are consistent and cleanly implemented.

Testing

testNonInlineFormLimitPerSessionDoesNotSetCookieWhenDisabled: Test that the ck_non_inline_form_displayed cookie is not set when the non inline form limit per session setting is disabled.

Checklist

@n7studios n7studios self-assigned this Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants