Skip to content
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

Creates an extra cookie #1046

Open
marklchaves opened this issue Apr 6, 2023 · 2 comments
Open

Creates an extra cookie #1046

marklchaves opened this issue Apr 6, 2023 · 2 comments

Comments

@marklchaves
Copy link
Contributor

Describe the bug

Popup Maker creates an extra cookie when you dismiss the default cookie name and a new one instead.

Site information

Popup Maker version: 1.18.1

WordPress version: 6.2

PHP version: 8

Expected behavior

I should only get my custom cookie name instead of both the default pum-nnn cookie and my custom cookie name.

Current behavior

See video https://share.wppopupmaker.com/9ZuKm0Zq

Steps to reproduce

  1. Create a trigger.
  2. Add a cookie.
  3. Dismiss the default cookie name (e.g., pum-123) and select "Add New Cookie" in the dropdown instead.
  4. Give your new cookie a custom name like pum-123-my-cookie.
  5. Both pum-123 and pum-123-my-cookie are created even though we wanted only the second one.

Errors

Additional context

@danieliser
Copy link
Member

@marklchaves probably not fixing this before we move to react.

This is due to creating the cookie and saving it as part of the trigger before opening the cookie editor. This would require a 2 way connection without proper global state management.

@danieliser
Copy link
Member

I should also add that this only happens if you do it via the trigger selector prompt initially. If you uncheck that box, then create the trigger and choose add new it doesn't happen.

Still the fix is likely more complicated than the problem, leaving it open though for now in case anybody else comes across it.

@marklchaves marklchaves changed the title Creates and extra cookie Creates an extra cookie Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants