Unable to uninstall/disable W3TC with S2

Hello everyone, i have S2 pro installed and running, i installed also the cache plug in W3TC. After testing we realized W3TC was to much for our needs so we went on to uninstall it. Problem is when we uninstall W3TC from our website, or if we just disable it´s “page cache” feature, then our S2 installation stops giving access to protected pages (with custom capabilities) for all ready logged in users.

It´s only logical to think W3TC has maybe overwritten some S2 permission somewhere, but every setting looks ok. Any idea that can help resolving this issue is most appreciated.

best regards

That’s weird behavior…

When you say logged in users can’t see protected content although logged in, this is right after the change, right? Did you try logging out and back in to start a new session and see if that helps?

When the protected content can’t be accessed, is the user redirected to the Membership Options Page by s2, or is the behavior different?

Hello Cristián, thanks. Yes i have tried logging out and back in, but with same result, logged in users get redirected to MOP page when trying to access protected pages if “page cache” feature is disabled, or w3tc plug is uninstalled and cleaned up of the installation all together, even though they have all necessary permissions. If i turn on “page cache” back again in w3tc then users regain access to protected pages.

After reading some info, i found that object cache may cause problems with wordpress transients. I´m no expert but, in fact i did turned on object cache for a while, without knowing of the warning. Could it be that some transients may have been stored in wordpress database (wich is not deleted by w3tc) and that could be it? if so, what would happen if i deleted all S2 transtients (active and/or expired) now that i have disabled object cache? would that brake S2 installation? because i do not want to make a bigger problem while trying to solve this…

I see. Thanks for trying it.

logged in users get redirected to MOP page when trying to access protected pages if “page cache” feature is disabled, or w3tc plug is uninstalled and cleaned up of the installation all together, even though they have all necessary permissions. If i turn on “page cache” back again in w3tc then users regain access to protected pages.

That is so weird…

i found that object cache may cause problems with wordpress transients. I´m no expert but, in fact i did turned on object cache for a while, without knowing of the warning. Could it be that some transients may have been stored in wordpress database (wich is not deleted by w3tc) and that could be it?

Object caching can cause weird behavior, yes. With W3TC enabled, can you disable that feature first, and then deactivate caching?

what would happen if i deleted all S2 transtients (active and/or expired) now that i have disabled object cache? would that brake S2 installation?

Transients are used for registrations links, for example: https://s2member.com/kb-article/what-is-the-transient-queue/

See also: https://www.s2member.com/forums/topic/thousands-of-s2m-transients-in-wp-database/index.html#post-35210

i have not yet deleted the transients, i was waiting for some feedback from you that would clarify the potential negative impact of deleting them. Also the potential as a solution, since i do not really know how all this works, i´m just trying…

another possible action i was thinking to try is disable S2 and Enable again, would that help in any way?

last thing i think i can tell you… when i was troubleshooting the problem i found in the inspect tools a message in the console, it says something like: “wrong content fetch, please load again” or very similar… didn´t know what that meant exactly…

I see… I don’t know what that’s about…

You can try that if you want, don’t know why it’d be required, but also don’t know why you’re having trouble deactivating the cache… lol

Just make sure you have the Deletion Safeguards enabled, so s2’s data is preserved. WP Admin > s2Member > General Options > Plugin Deletion Safeguards

It’d be good if you do a backup of the site before big changes, like messing with the database. It’s just good practice. Then you have something to revert to if it goes wrong.

i have not yet deleted the transients, i was waiting for some feedback from you that would clarify the potential negative impact of deleting them. Also the potential as a solution, since i do not really know how all this works, i´m just trying…

Let me know how it goes when/if you do.

:slight_smile:

i have this time constrains that allow me very little windows to try to fix things, thats because my users go in the website anytime they want.
I can try the transients thing NOW if you were available to help me if anything more goes wrong, like loosing access to protected pages even if i enable w3tc page cache back again. I´m kind of afraid of that, since i do not know whats the solution.
So please, tell me if you are going to be with me in the next minutes, and i can try it…

I’ll be here.

i just checked, i have 4 users who just logged in, i´m afraid it´s not a good time. I´ll just have to wait to late night to try the transients deletion. Anyway, for the description you gave about S2 transients, i feel thay may not be responsible. I´ll have to try it anyway i guess…

Okay.

Have you made sure that object caching is disabled in W3TC?

yes, it´s disabled. Only enabled options are page cache, browser cache and Verify rewrite rules.

i will disable all before deleting cache and then transients.

Okay. Let me know how it goes.

:slight_smile:

Hello Cristián, i´ve just purged all caches, disabled page cache, and deleted all S2 transients.

The issue persists, users are still being redirected by S2 to the MOP page.

When i turn back on page cache in w3 they regain access.

It would be great if we could coordinate to troubleshoot this whenever it fits your schedule, i can re send user login so you can check it for yourself… i live in Chile, so you may know the time difference.

Sure, I can take a look at it for you. I’ll message you so you can reply with the admin login and FTP details.

Is English good, or do you prefer Spanish?

:slight_smile:

Hola Cristián, me parece que hablas Español no?, bueno, solo para avisar que hoy encontre la causa del problema, y la solución. Resulto ser que en los días previos al problema implementamos una redirección en el sitioweb para forzar las www a todas las versiones del sitio. Esta redirección se implementa, pero los enlaces que apuntan a las areas protegidas no tienen las www por lo que no son reconocidos por S2 y entonces se redirige hacia la MOP al intentar acceder. Al actualizar los enlaces manualmente, agregandoles las www se soluciona el problema y puedo entonces acceder a las areas protegidas aún estando la “page cache” de W3 deshabilitada.

En los próximos días actualizare todos los enlaces, para finalmente deshabilitar y borrar w3 completamente ya que en realidad no nos hace falta. Espero no encontrarme con más detalles problematicos en el proceso, pero por ahora contento de haber solucionado el asunto. Me alegro también porque resulto ser algon bastante simple y de hecho no relacionado con el buen funcionamiento de S2.

Finalmente, una vez terminado todo esto, volvere a intentar lo de que mis usuarios pueden pasar directamente a la LIW page cuando hacen click en los enlaces del MOP ( si esque ya han ingresado previamente), creo haber entendido que la solución a esto pasa por agregar una condicional adicional en la LIW page, “if logged in” creo que se llama, ideal sería, ahora que podemos comunicarnos más fluidamente en Español, que me pudieras aclarar si voy por el camino correcto en este sentido…

Un saludo y muchas gracias por la buena disposición

2 Likes

Hola Paul!

Gracias por ponerme al tanto de lo que encontraste. Me da mucho gusto que lo hayas solucionado. Muy bien hecho! Claro, con www y sin www son dos sesiones de login distintas. https://www.s2member.com/forums/topic/dont-mix-www-and-without/

Si la persona llegó a la MOP cuando ya estaba logineado, puedes mostrarle un mensaje distinto usando s2If fijándote en is_logged_in(). Aunque si llegó a MOP, será porque quiso abrir algo para lo que no tenía acceso.

Otra cosa que puedes usar para personalizar el mensaje en la MOP, es s2MOP. https://s2member.com/kb-article/s2mop-shortcode/

:slight_smile:

Hola Cristián, gracias. Aprovecho de preguntarte si me puedes aclarar si con S2 tengo la posibililidad de mostrar un formulario en mi sitioweb solo a visitantes que provengan de tipo de trafico especifico… gracias y un saludo

Hola Paul.

s2 no tiene eso específicamente, pero lo puedes lograr con un poco de PHP, ya sea en el mismo post, o creando un plugin/hack para un eso, que luego te permita poner la condición con s2If, por ejemplo.

:slight_smile:

Gracias. Solo la última pregunta por este hilo, para no abrir otro por un tema simple…(creo).

Resulta que tengo activada la opción “allow custom passwords during registration”, aunque soy yo quien agrega los usuarios, no se pueden registrar ellos, solo cambiar la clave después.

Sin embargo pese a que en la siguiente opción " minimum strength/lenght for custom passwords" tengo seteado en 6 y strong, al momento de resetear las claves se puede elegir una clave debil con “confirma el uso de una clave débil”. Además el sistema muestra como sugerencia 12 caracteres, no 6 como esta seteado en S2.

¿Cuál es la manera de lograr con S2 forzar el uso de los caracteres seteados en S2 y la fuerza de la contraseña seteada como mínimo?

Te agradecería me puedas aclarar esto, un saludo.

Creo que ese setting es sólo para el registro del usuario con un custom password, quizás la forma s2Member-Profile también, pero no cuando el admin edita su perfil desde admin…