WordPress.org

Ready to get started?Download WordPress

Forums

Content Warning
Popup Keeps coming up (13 posts)

  1. djconqueso
    Member
    Posted 2 years ago #

    The dialog window keeps coming up when I click yes.

    I'm on the latest version of WP and Content Warning v2.

    Settings are:

    Toggle: Enable
    Sitewide: Enable
    Kill Checkbox (unchecked)
    Cookie Expire Time: 1 Day
    Allow Override: Yes
    Default Overrides: Enabled

    Enter Options:
    Select: Page (homepage)

    You can see it in action here: http://www.2ndcreative.com/clients/badger/

    http://wordpress.org/extend/plugins/content-warning-v2/

  2. Jerry
    Member
    Plugin Author

    Posted 2 years ago #

    Your settings seem right. I'll have to have a look at it in the morning. I'll try to squeeze it in before my client sends me files seeing as I can't actually work until then.

  3. spor7biker
    Member
    Posted 2 years ago #

    I'm having the same issue so have to shut it off for now.

    Oddly it is kind of working in IE. It only comes up two or three times then goes away. but in FF and chrome it loops.

    I have no problem 'buying you a cup' if I can get this to work.

  4. dsws
    Member
    Posted 2 years ago #

    I'm having the same issue as well. Any idea what is causing it?

    If I click YES it keeps bringing up the dialog box in an endless loop.

    http://www.westernspirits.me/

    Toggle Content Warning: Enable
    Sitewide: Enable
    Kill Checkbox: (unchecked)
    Cookie Expire: 10 Days
    Allow Page Overrides: No
    Default for Overrides: Dialog Enabled

    "Other Options" URL for YES is set to "/". I could not pick a page as that option didn't work. The radial button would not change to page and the drop down would not activate unless the radial button is checked (I assume).

    Any assistance would be greatly appreciated.

  5. dsws
    Member
    Posted 2 years ago #

    I think it should be setting a cookie called wpcwv2_validated but it doesn't appear to be setting that cookie for some reason which is why it loops.

  6. dsws
    Member
    Posted 2 years ago #

    If you re-check the "Kill Cookie" check box (after having saved it off) it will let you into the site and sub pages but, this seems to only set a session cookie not a 10 day or 2 week cookie. If you close your browser and come back, you have to click the "Yes" again. Doing this seems to have set a cookie called "wpcwv2_validated[siteWide]" - expiring at the end of the session.

    Hope this information helps. I wish I was PHP programmer. :-(

  7. dsws
    Member
    Posted 2 years ago #

    Toggling "Allow Per-Page/Post Overrides" to YES seems to have fixed the problem. It writes cookies now. And, the cookie timeout in days can now be set while also having the "Checking this will kill the cookie immediately" unchecked.

    I think issue only happens when you have the "Allow Per-Page/Post Overrides" set to NO.

    Hope this helps.

  8. spor7biker
    Member
    Posted 2 years ago #

    I tried those settings and am still having issues.

  9. Jerry
    Member
    Plugin Author

    Posted 2 years ago #

    Dsws thanks for taking the time to investigation this. I've been really busy lately and haven't had the time. You guys should note that I may be doing a complete re-writ of the code mainly to decrease the confusion over the options and make it a little more simple. Not to mention I want to incorporate things like customization and category blocking.

  10. stillrivercreative
    Member
    Posted 2 years ago #

    I've tried every combination of settings and I get a persistent popup no matter what. Every time I click Enter, it comes back.

    Test here:

    http://stillrivercreative.com/mba42/

  11. VishousRhage
    Member
    Posted 2 years ago #

    Hey guys - just posting this up as an fyi. I was doing the loop-da-loop as well until I deleted my site url from the url box. So all my settings are:

    MAIN
    Toggle Content Warning: Enable
    Sitewide: Enable
    Kill Checkbox: (unchecked)
    Cookie Expire: 1 Days (I set it to one day so I can test it tomorrow :)
    Allow Page Overrides: No
    Default for Overrides: Dialog Enabled

    DIALOG-Enter Options
    Enter Text: Enter
    Select What to Use: URL
    Enter a URL: Blank
    Select a page: NONE

    I'm thinking that adding the same site url may be causing the loop, but I'm not a programmer so I really don't know if that's a possibility.

  12. Jerry
    Member
    Plugin Author

    Posted 2 years ago #

    Found the loop guys, it was due to users being redirected prior to the cookie being set. I've fixed it to where it waits for a response from the server that the cookie is set then redirects the user. Tested on my personal server, and works fine now.

  13. dsws
    Member
    Posted 2 years ago #

    I think the setcookie() command has to come before any HTML. In other words, it has to come before the beginning <html> tag in the code that is being output. The web server has to get the cookie command prior to the html file header (unless output buffering is turned on) otherwise the cookie won't get set. Not sure if that was the case here but it might have been so I thought I would mention it just in case.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic