Support » Plugin: Slideshow » css changes when logged out

  • I noticed that the style sheet for the plugin is loaded using:


    I also noticed that admin-ajax.php works differently depending on whether or not I’m logged in. As a result, it seems that the css responsible for the text overlay on the slideshow is not loaded unless I’m logged in. As a result, my customizations of the css for the overlay only work if I’m logged into WordPress. Why and how do I change that?

    Here are 2 screen captures to show the difference as reported by Firebug:



Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Stefan Boonstra


    All stylesheets that the slideshows use are generated using WordPress’ admin-ajax.php file. By default it allows visitors who are logged in to use its functions, but for visitors who aren’t logged in an exception must be made.

    It could be that this exception is overruled by another plugin, stopping the stylesheet from loading when a visitor is not logged in. You could see if this is the case by disabling your plugins one by one until the slideshow appears styled again.

    Is there some way I can disable that feature so that everyone, whether logged in or not sees the same stylesheets? I don’t want visitors being able to customize anything, even if they are logged in.

    Plugin Author Stefan Boonstra


    I’m sorry, I didn’t explain that very clearly.

    There’s no feature that allows visitors to see the slideshow in any other way. The reason that the slideshow is styled differently when you’re logged out, is that the stylesheet couldn’t be loaded. This problem is probably caused by a conflict with another plugin.

    It looks like, when not logged in, (according to Firebug) no call to admin-ajax.php is even being made. Is it somehow possible for some other plugin to prevent your plugin from even making that call? Is that what you are suggesting?

    Here’s the list of css files loaded when logged in:

    css logged in

    Here’s the list when not logged in:

    css not logged in

    Plugin Author Stefan Boonstra


    Yes, it is definitely possible for another plugin to prevent this call from being made. You can see whether or not this is the case by disabling your other plugins and seeing if the problem persists.

    Is there anything I can do to prevent another plugin from preventing your plugin from loading it’s style sheet?

    Yes, I could find the other plugin and disable it but that’s not really a good option for me.

    I could copy the desired css into a static style sheet and load it myself but is there a better way?

    Plugin Author Stefan Boonstra


    I’m sorry. If “admin-ajax.php” is blocked by another plugin, there’s no out-of-the-box way to load the stylesheet.

    For now, you could indeed create and load a static stylesheet. I’ll create an automattic work-around for this problem as soon as possible and provide you with a download link when it’s done.

    Thanks, Stefan. I really appreciate your help and if you can protect your plugin against the problem I’m seeing that would be great!

    Plugin Author Stefan Boonstra


    I have placed the newest version with the work-around for your problem on GitHub, you can download it from here.

    I think something’s missing. I renamed the old directory, uploaded the beta version, renamed it to match the old directory and I get this error as soon as I visit my test site:

    Fatal error: Class ‘SlideshowPluginAJAX’ not found in wp-content/plugins/slideshow-jquery-image-gallery/slideshow.php on line 40

    Plugin Author Stefan Boonstra


    I’m terribly sorry, the SlideshowPluginAJAX file got renamed automatically to a lowercase version. This is what caused the error.

    I have updated the file name. The error should be resolved now.

    The error is gone, but the problem still remains. admin-ajax.php is still not being called when I’m not logged in. I’m now able to use a test version of my web site. I disabled ALL plugins except the slideshow. The problem still remains.

    The beta version you gave me shows up as ver 2.1.18, so it’s not that I made a mistake and I’m still accidentally using the old version

    I can’t figure out what would make my installation different from everyone who is not seeing this problem.

    There was a time when this was working properly. Something changed at some point but I can’t figure out what that could be nor do I even know when it happened.

    Can you give me any clues as to how something else could prevent your plugin from calling admin-ajax.php? If I know how to cause this problem on purpose, maybe I can figure out what’s doing it by accident.

    Plugin Author Stefan Boonstra


    That’s very strange.

    However, the loading of the admin-ajax.php file does depend on a function that should usually work:

    <?php admin_url(); ?>

    The documentation of this function can be found here.

    If the function doesn’t output any correct data, loading the stylesheet may fail. Perhaps this is causing the problem.

    The last version that didn’t use the admin-ajax.php loaded stylesheet yet, was version 2.2.7. A lot of bugs have been fixed since that release, though.

    For now, I think I’m just going accept this as an anomaly and use the static css file that I created. I have your plugin working just fine on a completely different web site.

    Thanks again for all your help.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘css changes when logged out’ is closed to new replies.