popover stopped working, how can I get it to pop again?

Pop overs worked for 1 day with 3 popups restricted to logged on members and specific urls (external source). this morning it stopped working on production but is still working on our staging site.

I have rebuilt popups and removed and reinstalled the plugin, changed external to footer, toggled active but no success. All popups say active.

This is an important component of our latest release. Can you help get it going again?

  • Alexander
    • DEV MAN’s Mascot

    Hi @vivinow,

    Are there any other changes that have been made on the production site? Are you using the same combination of other plugins and the same theme?

    This could be a plugin conflict. Can you check the javascript console for errors? In Chrome go to “View -> Developer -> Javascript Console” and in Firefox you can go to “Tools -> Web Developer -> Console”

    Best regards

  • vivinow
    • Site Builder, Child of Zeus

    Thanks. The chrome console shows the following error on production vivinow.com/startnow:

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://vivinow.wpengine.netdna-cdn.com/wp-content/plugins/popover/popover-load-js.php?ver=3.5.2

    The address referenced in this error is our cdn address. it is different from our domain vivinow.com.

    On our staging site, also a different domain, it displayed the popup but also had the following message:

    Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.

    Is this the problem? If yes, how to fix.

    Thanks,

    Boyd

  • Alexander
    • DEV MAN’s Mascot

    @vivinow,

    This looks like your server is treating that particular javascript file as static resource. It looks like they’ve pushed it onto a CDN (Content Delivery Network)

    Usually this is a good thing, and will improve performance. However, that file also has some PHP included to prepare the javascript file.

    I’m referring to this file:

    wp-content/plugins/popover/popover-load-js.php?ver=3.5.2

    Do you have a way to exclude files from being cached? You might need to check with your host to have them treat this as a PHP file. If we can’t get it to work this way, I can look into other solutions, but we may end up needed to modify the pop up code.

    Best regards

  • vivinow
    • Site Builder, Child of Zeus

    I have asked the question of WPEngine.com, our hosting provider, about not caching files, however, since your code is in a plugin, how would I/they isolate that part of it not to be cached?

    Eliminating the matching of the url would solve the problem in our staging site(different domain) as well as the cdn. Is there a line or two that I can comment out or remove that would fix the problem?

    Thanks,

    Boyd

  • Alexander
    • DEV MAN’s Mascot

    You mentioned trying to load from the footer earlier. Could we give this another try first?

    Try switching to the footer loading method and seeing if you get any javascript errors.

    The footer method doesn’t rely on that customized javascript code that we’re loading over PHP.

    There is a code fix we could try, but it would be a bit more involved than commenting out a few lines. We would need to get the JS to load inline with the page instead of as a separate file. This is possible, but would be much better if we could get the footer method working instead.

    Best regards

  • Alexander
    • DEV MAN’s Mascot

    I’m not sure yet. With the footer loading method, it should actually be placed into the code of the page yet hidden. Then it is triggered by javascript to be displayed

    Can you give an example of a URL is should be loading on?

    Then I can check to see if it’s actually being placed in the code – this will give us a better idea of what’s wrong. We’ll be able to know if the problem is that the popup isn’t being sent when the page is loaded, or that the popup is sent, but never triggered to become visible.

    Thanks!

  • Alexander
    • DEV MAN’s Mascot

    Hey just see you responded while I was typing. Could you link me to that page? Sounds like we have a javascript conflict – but one that I still think will be easier to resolve than modifying the PHP code.

    I might be able to workout what’s happening after examining the page.

  • vivinow
    • Site Builder, Child of Zeus

    Our hosting support responded as follows:

    Our CDN system is based on URLs, not necessarily files. What we can do is specify the URL that’s calling that file and we can exempt that from the CDN. This way that file won’t be sent to the CDN to be stored.

    Just let us know which URL that’s on and we can get it put in.

    Does the popup have a unique url? The pages with popups rely heavily on the cdn to deliver images and could not be exempted as they are the reason we need a cdn.

    Thanks,

    Boyd

  • vivinow
    • Site Builder, Child of Zeus

    I have been trying to add popups to take advantage of Firefox and IE working. Editing the popup content in chrome did not change the content in the popup. As a result, I had to create a new popup each time I wanted to update the popup.

    vivinow.com has a not logged on popup that is working.

    Thanks for your help. I am anxious to get this problem behind me.

    Boyd

  • Alexander
    • DEV MAN’s Mascot

    Hi @vivinow,

    I’m so sorry about they delay. Maybe you just need to clear your cache in Chrome?

    I can confirm that the popup is working for me in Chrome right now.

    If you’d like to switch back to the other loading method, the URL you would need to exempt is:

    http://vivinow.com/wp-content/plugins/popover/popover-load-js.php

    This would only relate to the other loading method.

    Any static resources such as images can still be loaded over CDN or cached. The pop up is just a small bit of HTML that is loaded dynamically depending on condition – it won’t have much impact on performance. The images loaded within the popup will always be retrieved from the same URLs and can be loaded over CDN just fine.

    Best regards

  • vivinow
    • Site Builder, Child of Zeus

    Clearing the cache solved the chrome problem. Also thanks for the url to exempt from caching. I will wait to have them exempt it from caching.

    This has been frustrating and an unexpected problem.

    Thanks for your help and persistence.

    Boyd

  • vivinow
    • Site Builder, Child of Zeus

    Thanks for your help. There are two more things on popups that need your help.

    >> adding the constraint of #times to show stops the popup from showing at all and there is no error message in chrome or firefox

    >>updating works sometimes and not other times. Deactivating and reactivating sometimes causes the new version to show and logging off of vivinow.com and relogging on will correct the problem but occassionally, you have to create a new popup and disable the old one.

    This erratic behavior is time consuming and frustrating.

    Thanks,

    Boyd

  • Alexander
    • DEV MAN’s Mascot

    >> adding the constraint of #times to show stops the popup from showing at all and there is no error message in chrome or firefox

    >>updating works sometimes and not other times. Deactivating and reactivating sometimes causes the new version to show and logging off of vivinow.com and relogging on will correct the problem but occassionally, you have to create a new popup and disable the old one.

    I think both of these are cacheing issues. Can you try testing in Chrome incognito mode? See if this makes a difference.

    Otherwise it could be the cacheing happening on your server. Are you having these issues on your staging site?

    Best regards