Hi Geoffrey,
I’ve had the same problem and found a solution that works for me. Perhaps you can try it. Just to be clear, the problem is this:
When the landing page setting is set to “Return to same url” and you log out, you’re sent to the login page with the “return_to” URL parameter referencing the logout page, causing a login/logout loop when you do log back in.
Unfortunately my solution requires an update to the source code, meaning it’ll likely be undone when the plugin is updated. However, it’s a one line change and could simply be bookmarked as an added step.
FIX:
1. ftp to the “includes” folder of the plugin:
wp-content/plugins/jonradio-private-site/includes
2. edit file public.php
3. In function jr_ps_after_login_url(), change line 271 from
if (strpos($_SERVER[‘REQUEST_URI’], ‘resetpass’) !== false) {
to
if (strpos($_SERVER[‘REQUEST_URI’], ‘resetpass’) !== false || strpos($_SERVER[‘REQUEST_URI’], ‘logout’) !== false) {
This will cause the logout to redirect to the homepage first, which, due to the private site setting, will then redirect to the login page. This causes the “return_to” parameter in the URL to reference the home page instead of the logout page.
Let me know if it worked.
-
This reply was modified 4 months, 1 week ago by
bprael2.
Hi,
I appreciate you coming back to me on this issue. But I moved to another plugin with less features but perfectly fits my needs. As a bonus it also works with WP super Cache.
Regards,
Geoffrey
I’d be interested to know which plugin you switched to. Hadn’t heard about super cache but would be very interested to try it.
thx
Brent
Hi Brent,
This is the one, it just does the job for me.
https://fr.wordpress.org/plugins/wp-force-login/
@geoffreymerck: I do wish you’d posted a support request in the ticketing system. It’s a great way for me to keep track of your specific issues, and I could have helped you. That said, I’m glad you found a viable alternative.
@bprael2: That’s an interesting option. I’ve put it on my coding list to see if it’s something that can be added as a switchable option. Probably won’t be an immediate upgrade, but definitely stay tuned to the release notes to see if/when I get it in there.
–David