-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form Submission Cookie Not Automatically Setting "Form" Key #866
Comments
@danieliser I think this may affect any cookie that has any extra settings added. In triggers.js, we check to see if the checkbox is checked and set the time, path, and event type here: https://github.com/PopupMaker/Popup-Maker/blob/master/assets/js/src/admin/popup-editor/plugins/triggers.js#L431 Which we then pass to That then gets added to the editor through the Unless I am mistaken, I don't think Popup Maker ever adds in any default settings for any extra setting field that is added to a cookie, such as If this is correct, it should be as simple as doing a |
@fpcorso - It is one of the older systems still in place, very well possible it has no default value merge. Try it and see what happens is all we can do. |
@danieliser After a bit more debugging, I realized there are other settings that haven't been included too due to this. For example, the session-wide setting was never set for any cookie if you never manually edited the cookie. Of course, our checks also checked if it was set so it didn't affect anything unless they went in and turned it on so it wasn't an issue anyone would notice. So, I set up a getCookieDefault method which flattens the default fields into the settings object and then used that for the |
Describe the bug
When generating any trigger and automatically adding a "Form Submission" cookie, the cookie gets created but the
form
key does not get set. This causes the cookie to not be set. The issue is resolved by editing the cookie and either making no changes or setting the form to any form. Once updated, theform
key will be valid.Site information
Popup Maker version: 1.11.1
WordPress version: 5.4
Expected behavior
Should automatically set the
form
key.Current behavior
form
key is not set.Steps to reproduce
form
key is present:form
key:Errors
No JavaScript errors are shown during cookie creation or editing.
The text was updated successfully, but these errors were encountered: