Members plugin login only working on IE!

6 Replies ·

  1. Hi there,

    I’ve been asked to help someone who’s using the Members plugin on their site to hide content from non-registered users for his UK Tax Return service website at https://www.uk-taxreturn.co.uk.

    We have a very strange issue whereby in IE, the user logs in, is redirected to a specific page and can see the hidden content as required.

    However, in both Firefox and Chrome, once redirected they don’t see the hidden content – only the “Sorry, but you do not have permission to view this content.” message.

    Are you able to assist as my client is panicking as he can no longer support his users.

  2. Justin Tadlock

    It’s impossible for different browsers to behave differently with users who are logged in. This is handled on the server side of things and not browser side. If the user does indeed have permission to view the content, it’s possible that they didn’t actually log in. Now, this could very well be a browser issue, such as having cookies turned off. One thing to keep in mind is that Members does not control logging in. This is handled by WordPress. If there’s an issue with this, there’s probably nothing I can do to help.

    To even begin to help debug your specific situation, I need to know a few things.

    First, how are you doing the permissions for the page? Is this via one of the shortcodes? Is it via the Content Permissions feature? If using one of these features, how is it set up? What’s the link to the page where it’s being used?

  3. Bola

    Hi Justin,

    Although the issue was reported by my client’s users, I’ve managed to replicate the behaviour myself when logging in as a “Customer” user. It definitely works in IE but not in Chrome or Firefox.

    I’m a web developer by trade, and develop many apps that use cookies, javascript, etc and never have any issues like this – which is why I’m not certain that this issue relates to cookies. It’s truly a wierd issue!

    So, the homepage has the login widget on it – this is configured to redirect to https://uk-taxreturn.co.uk/index.php/my-information-centre when a “Customer” user logs in.

    The content is protected using the “Content Permissions” feature rather than shortcodes – specifically locking it down so that only “Customer” users can see the content.

    Finally, there’s a sidebar on the page using the standard “Text” widget. It does use your shortcodes to show/hide content using the following code:

    `

    user_firstname && $current_user->user_lastname) {
    $jc_displayname = $current_user->user_firstname.” “.$current_user->user_lastname;
    } else {
    $jc_displayname = $current_user->display_name;
    } ?>

    Welcome to your secure client space.

    Thank you for your payment. We hope that you are pleased with our service and will consider using us for your next tax return. Please feel free to email us with any comments that may be applicable to the service received. You are welcome to use the facilities in your login throughout the year.

    Take a look at the My Information Centre page for what to do next or go straight to the My Details page to make a start. This is an easy form comprising mainly tick boxes without requirement for any further personal identification details. When you have completed this we will review the information and contact you shortly afterwards.

    0 && $jc_status != “Paid”) { ?>

    Based on the information provided, our fee to prepare and submit your tax return is £

    0) { ?>

    You have paid in full, thank you.

    0) { ?>

    You have paid £, thank you. You have £ to pay.

    0)) { ?>

    The PayPal Button or payment options will appear in this area when it is time to pay your fee.

    Fixed Fees

    Option 1 £49,00 GBP

    Option 2 £59,00 GBP

    Option 3 £69,00 GBP

    Option 4 £79,00 GBP

    Option 5 £89,00 GBP

    Option 6 £95,00 GBP


    0) { ?>

    We will contact you to arrange payment

    <input type="button" value="Log Out" onClick="document.location.href='’;”>

    `

    Does this help shed any light?

    Regards,
    Aaran

  4. Bola

    Justin,

    I put the above code inside backticks as suggested, but it’s stripped off the <?php codes for is_user_logged_in etc.

    Is there another way I can send the full code to you?

    Regards,
    Aaran

  5. Bola

    If it helps at all, the right sidebar on that page uses the “Register/Login” widget…and in Chrome, it’s showing the “Logged Out Text” set for that widget as though the login process failed.

    Obviously, in IE it shows the “Logged In Text” as expected.

    Any chance you can get back to me on this soon please, as my client’s customers are starting to complain as they can’t access the tax return system they pay him to provide! :s

    Warm regards,
    Aaran

  6. Justin Tadlock

    I’m a web developer by trade, and develop many apps that use cookies, javascript, etc and never have any issues like this – which is why I’m not certain that this issue relates to cookies. It’s truly a wierd issue!

    If it works in one browser but not another, I can’t think of a reason it’d be a Members plugin issue. Members only deals with things on the server side. It works based on the information provided to it by the WordPress install.

    Generally, this means a cookie issue from my experience. WordPress 4.0 introduced a new bug related to cookies. It may or may not be related, but it’d be worth looking into. https://core.trac.wordpress.org/ticket/29518

    If it helps at all, the right sidebar on that page uses the “Register/Login” widget…and in Chrome, it’s showing the “Logged Out Text” set for that widget as though the login process failed.

    It sounds like you’re having issues with users logging in. There’s not much that can be done with the Members plugin as far as that is concerned. You said you configued the login widget to redirect to a specific page? Maybe try removing that redirect and allowing WP to handle it with the default redirect.

    If it shows the “Logged Out Text”, this means that that the WordPress function `is_user_logged_in()` is returning `FALSE`. Assuming this is not a browser issue, you would most likely have a plugin or custom code in your theme files that alters this in some way. My only other recommendation at this point would be to disable all other plugins to see if that corrects the issue.

    ***

    Here’s a couple of options for storing long blocks of code:

    * http://pastebin.com/
    * https://gist.github.com/

  7. Bola

    Thanks for the tips Justin, I’ll see what I can do using your suggestions.