Skip Navigation

[Resuelto] It seems like Access isn't displaying the proper content

This support ticket is created hace 5 años, 2 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por Darryl hace 5 años, 1 mes.

Asistido por: Nigel.

Autor
Mensajes
#1354383
Image%202019-10-02%20at%201.38.50%20PM[1].png

Recently, a site that has been running for several years has started to act oddly.

I'm using this shortcode to restrict content:

[toolset_access role="Guest" operator="allow"]

I'm using this shortcode to grant access to content:

[toolset_access role="Administrator,Editor,Author,Contributor,Subscriber" operator="allow"]

The procedure for replicating this behavior is to go the the website when not logged in and view the content. Login when prompted and then go back to the page. You are still shown as logged out and are prompted to login.

Refreshing the page or hitting CTRL F5 shows the proper page content that you should see when logged in.

The website is hosted on SiteGround which has it's own caching plugin, which I've completely disabled.

I've tried this on the latest Chrome, Edge, Firefox, and Edge Beta.

enlace oculto

#1354935

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Hi Darryl

Sorry, it seems my earlier reply has been lost, let me try again.

It doesn't sound like an issue with the toolset_access shortcodes, it sounds more like something to do with the log-in form and the redirect.

Can you explain how that is set up?

#1355195

As you can see in the screencast, what happens is people are viewing the content when they're not logged in, which is a custom post type single.
I'm using Toolset Access to restrict access to some of the content on the page and showing a login prompt to someone who isn't logged in.
After they go through the login process and go back to view the content, they're still being restricted and shown the login prompt.
Refreshing the page (sometime CTRL F5 is required) shows the page as it should with restricted content being shown to logged in users.

#1355521

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

OK, but I was looking for specifics about your log-in and redirects.

Can I get access to your site to look myself?

Let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

Can you also confirm the page with the problem?

#1357321

It looks SiteGround's "SG Optimizer" plugin was the culprit.

The plugin added some stuff the the .htaccess file for browser caching. I don't remember turning it on (it happened on multiple sites) but regardless with it turned off, the additions to the .htaccess file were not reverted.

I removed:

# Leverage Browser Caching by SG-Optimizer
<IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault                                      "access plus 6 months"
  # CSS
    ExpiresByType text/css                              "access plus 1 year"
  # HTML components (HTCs)
    ExpiresByType text/x-component                      "access plus 2 months"
  # HTML
    ExpiresByType text/html                             "access plus 6 months"
  # JavaScript
    ExpiresByType application/javascript                "access plus 1 year"
    ExpiresByType application/x-javascript              "access plus 1 year"
  # Manifest files
    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
    ExpiresByType text/cache-manifest                   "access plus 0 seconds"
  # Media
    ExpiresByType audio/ogg                             "access plus 1 year"
    ExpiresByType image/gif                             "access plus 1 year"
    ExpiresByType image/jpg                             "access plus 1 year"
    ExpiresByType image/jpeg                            "access plus 1 year"
    ExpiresByType image/png                             "access plus 1 year"
    ExpiresByType image/svg                             "access plus 1 year"
    ExpiresByType image/svg+xml                         "access plus 1 year"
    ExpiresByType video/mp4                             "access plus 1 year"
    ExpiresByType video/ogg                             "access plus 1 year"
    ExpiresByType video/webm                            "access plus 1 year"
    ExpiresByType image/x-icon                          "access plus 1 year"
    ExpiresByType application/pdf                       "access plus 1 year"
    ExpiresByType application/x-shockwave-flash         "access plus 1 year"
  # Web feeds
    ExpiresByType application/atom+xml                  "access plus 1 hour"
    ExpiresByType application/rss+xml                   "access plus 1 hour"
  # Web fonts
    ExpiresByType application/font-woff                 "access plus 1 year"
    ExpiresByType application/font-woff2                "access plus 1 year"
    ExpiresByType application/vnd.ms-fontobject         "access plus 1 year"
    ExpiresByType application/x-font-ttf                "access plus 1 year"
    ExpiresByType font/opentype                         "access plus 1 year"
</IfModule>
# END LBC
# BEGIN WordPress

and it's working now.