• Resolved janestreet

    (@curtis4)


    Is there a reason the no-cache content won’t display to incognito users (it says “You do not have sufficient permissions to access this page.”) Is there a workaround please?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jose

    (@giuse)

    Hi @curtis4,

    is that content available for non-logged users?

    I suggest you create a testing page with the same content without using Content No Cache, and visit that page in incognito, but being sure it’s not server by cache.
    If for example you create the page https://yoursite.com/testing-page/ with the same content, then visit it in incognito at https://yoursite.com/testing-page/?a=1. If you want to visit it again, do it at https://yoursite.com/testing-page/?a=2, and so on. By doing so you will probably by-pass the server cache, and be able to see what non-logged users see.
    If you can’t see the content, then of course, with Content No Cache will also be not possible to see that content.

    I hope it helps.

    Have a great day!

    Jose

    Thread Starter janestreet

    (@curtis4)

    There are no logged in users.

    https://oot.ms/2PR

    If you try that page in standard mode and incog, you’ll see what I mean (the no-cache content is the left sidebar “Latest News”)

    It only happens with content-no-cache. When I put the code in there regularly, it displays in incognito as it should.

    • This reply was modified 10 months, 2 weeks ago by janestreet.
    Plugin Author Jose

    (@giuse)

    I had already understood what you meant. The page that you shared confirms exactly what I understood from your first post.

    Content No Cache retrieves the content via Ajax, for both logged and non-logged users. If you visit the page in incognito, you are surely logged out. If you see it with the same browser that you use to access the backend, you may be logged in.

    If you have this issue, and you are completely sure non-logged users see the same content as logged users when the content is not served by Content No Cache, then it means the source of that content is denied for non-logged users when it’s retrieved with Ajax.

    You can try adding the parameter request=”remote” to your CNC shortcode. Let me know if it works.

    Have a great day!

    Jose

    Thread Starter janestreet

    (@curtis4)

    Yes, you’re right. When I try on a device that has never been logged in, it shows that error message. (We are using the ‘remote’ parameter)

    So all logged-out users are denied the content, which is a shortcode that grabs the ‘latest-posts’ php code from another plugin. Is there a way to directly no-cache php code with your plugin alone?

    • This reply was modified 10 months, 2 weeks ago by janestreet.
    Plugin Author Jose

    (@giuse)

    CNC calls via Ajax this URL: https://www.oliveoiltimes.com/wp-admin/admin-ajax.php?action=eos_dyn_get_content

    If you directly write on your browser that URL and you aren’t logged in, then you see the same message You do not have sufficient permissions to access this page.
    The same if you visit https://www.oliveoiltimes.com/wp-admin/admin-ajax.php?action=testing or whatever URLs contain wp-admin/admin-ajax.php

    Usually, you should see the number 0 when you directly visit that kind of URL.

    Probably, you have a plugin or a system that denies the access to https://www.oliveoiltimes.com/wp-admin/admin-ajax.php if the users are not logged in.

    If it’s a plugin, you can solve it with Freesoul Deactivate Plugins.

    After activation, go to Freesoul Deactivate Plugins => Actions => Content No Cache, and disable all the plugins, but the plugin that generates the content shown in the sidebar. If the content is generated only by the WordPress core, just disable all the plugins.

    If it doesn’t help, have a look at the file .htaccess to see if any rules deny access to https://www.oliveoiltimes.com/wp-admin/admin-ajax.php if the logging-in Cookies are not set.

    I hope it helps.

    Thread Starter janestreet

    (@curtis4)

    The culprit turned out to be a plugin “WP Bulk Delete

    Thank you for your help. CNC works as expected now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Won’t display content in incognito mode?’ is closed to new replies.