Why restrict functionality for deauthorising users?

Gave the WordPress site on which it is necessary to insert pictures with fancybox on the page. On the website you installed some plugin with shortcodes. Insert the shortcode on the page "Gallery". Everything works fine, the pictures open, even turning here and there, BUT only for authorized users. Standing out from the admin panel in the browser, and the effect of the fancybox stops working. Ie, the images just open in the usual way in full screen in same window. Autorisoes, and again I have everything working. Checked in Mozilla and Chrome - the behavior is the same.

UPD: cache, I think, is not connected, because they came in Chrome, not authorized - not working. Logged in and it started to work. Where Chrome could know what to show, if he wasn't on the website at the time when it worked? I did this all in Mozilla.

UPD2: Made the fancybox using a plugin "FancyBox for WordPress", i.e. manually ordered each link on the image the fancybox class without any shortcodes and dialogs plugins. The same. Tried other plugins not working. Some kind of block on the fancybox!
March 12th 20 at 08:42
3 answers
March 12th 20 at 08:44
Solution
On the WordPress forum gave me this answer:
---------------------------
however, the problem is clear — cut theme your jquery from a cdn instead of the native libraries from the distribution of the engine:

<script src="https://code.jquery.com/jquery-1.9.1.min.js"
integrity="sha256-wS9gmOZBqsqWxgIVgA8Y9WcQOa7PgSIX+rPA0VL2rbQ="
by adding crossorigin="anonymous"></script>


and polls wordpress plugin to work with the native library and call the scripts using jQuery but not using $. when the user is logged in — wordpress loads its own version of jquery for the admin bar scripts and fancybox working. and without authorization does your version of jquery from a cdn and fancybox is not working.
March 12th 20 at 08:46
Hello!
Not the fact that the problem is in the limitation of functional...
If that's a problem of cache? Authorizing in the admin panel you are viewing the uncached version of the site, and comfort - see a cached version.

Check caching plugins on the website (the Fastest Cache, Super Cache, W3 Total Cache, PageSpeed Ninja) if they have clear the cache. Also clean the browser cache.
Also, if the site is connected to the CDN, then clean the cache on the side of the CDN (e.g. Cloudflare - Cache - Purge Everything).

I don't think fancybox has made a restriction of rights... but just in case take a look at the plugin settings...
I cleaned the cache. Yes, there is a plug-in optimizing, but I cleaned the cache. Previously, it helped when I made changes on the website in the layout and they were not visible, no one but me in the browser, which worked. - alec commented on March 12th 20 at 08:49
March 12th 20 at 08:48
UPD: cache, I think, is not connected, because they came in Chrome, not authorized - not working. Logged in and it started to work. Where Chrome could know what to show, if he wasn't on the website at the time when it worked? I did this all in Mozilla.


- There that you may have installed thirudi plugin in wordpress that generates static html cache, which gives the years without authorization. Check the presence of a caching plugin in WordPress admin panel and clean cache in it.

Find more questions by tags WordPress