Okay
  Public Ticket #3695804
B2B King Pro registration bug
Closed

Comments

  •  1
    nick started the conversation

    Hi,

    There is a problem with the B2B King Pro plugin. When this plugin is active, it is not possible to create an account. I have already checked it by removing all cache from the site including the cache from B2B King. I also deactivated all plugins, this is where I realized that the problem lies with the B2B King Pro plugin. The core plugin is active and the registration functionality works. Please help me fix this problem, because we need the functionalities that is in the Pro plugin. If you need more information, please let me know!


  •  2,281
    WebWizards replied

    Hi Nick,

    I checked this now on your site and did a few tests,


    Something that stands out to me is that the URLs / endpoints seem unusual.

    In the menu, the user icon links to https://cressana.com/account/ , but clicking that actually leads to https://cressana.com/account/edit-account/ - I think somewhere here there is some kind of redirect / misconfiguration / configuration that does not work with B2BKing,


    My suggestion would be to maybe try to set up a new My Account page as follows:

    -> Create a new page with the [woocommerce_my_account] shortcode inside.

    -> In WooCommerce - Settings - Advanced, choose that page here:

    5828519927.png

    -> In B2BKing -> Settings -> Registration, set "separate my account page for b2b" to "Disabled":

    9273782324.png



    If you would like, we can also investigate and troubleshoot this directly on the site. For that, we would need a backend login to the site, or to a staging clone site we can work on,


    Kind regards,

    Stefan

  •  1
    nick replied

    Hi Stefan,

    Thank you for reaching out. I got rid of the redirect that was taking place, I created a new account page and changed the settings in WooCommerce and B2BKing. In B2BKing, all the settings were already correct.

    With these changed made, the problem still exists. When visiting the account page you already see the screen with the account settings, even when visiting via incognito while nobody is logged in. The other pages lik orders, adresses and logout show the same page, while the link does change. I have tried again by deactivating B2BKing Pro and this resolves the issue. But since we need B2BKing Pro, we need to come up with a solution.

    Could you please provide us with more help to fix this problem?

  •  2,281
    WebWizards replied

    Hi Nick,

    Thanks for the feedback,


    I've checked this now again on the site and I noticed something:

    - The account page there is not showing "notices" (messages / errors) at all. For example if I try to login with random details, there would normally be a message in woocommerce such as "the account you are trying to log in as does not exist", or "incorrect password". But on your site I do not see any message at all: https://www.loom.com/share/94ea4406d2334ed3b62442acd44a3933?sid=0f1ffd6a-674e-478c-ba38-6accd2b47fb6

    I think this is probably because that page does not have a "woocommerce notices" area that can display such messages. I would suggest to try to edit the account page and see if you can find any kind of "woocommerce notices" widget / block to add to the top of the page.

    - That leads me to the next possibility: I think what may be happening is that accounts are being created, but they are set to require manual approval. Normally B2BKing shows a message such as "your account is pending approval, please wait to be approved before you can log in" - since the page isn't showing notices at all, this message would also not show.


    Therefore this might be an approval issue, so please try to:

    -> Go to B2BKing -> Settings -> Access and DISABLE "Manual approval for all". This setting will require approval for all users including B2C.

    -> Now you may still have approval set for each registration role. This can be controlled in B2BKing -> Registration Roles

    3517933590.png

    You can try to set "automatic" approval here, so that customers can register / login directly, without having to have their accounts approved first.


    Other than that I'm really not sure what it could be. Maybe some kind of plugin conflict, internal error, etc. It would be great if you were able to share a access to the site, or some staging / development clone site, so we can troubleshoot directly.


    Kind regards,

    Stefan

  •  1
    nick replied

    Hi Stefan,

    Thank you for your respond. Although I am not even seeing te login/register screen, I have added the WooCommerce Notices widget on the account page. I get the following screen as you can see in the attachments. I am visiting the page via incognito without logging in but I still see the screen as if I am logged in. This happens in different browsers, incognito or not. I want to let you know that this only happens for me with the B2BKing Pro plugin activated. I have also checked if there are any users that are waiting for approval. But there are no testaccounts that are registered by trying to create new accounts. This means that because of the bug, no new accounts can be created, even if they are waiting to be approved.

    Can you please check on your end if the WooCommerce Notices does show a message? And can you please further investigate why I can't see the login/register page the same as you do?

    Attached files:  Scherm­afbeelding 2024-08-05 om 16.57.04.png

  •  1
    nick replied

    I saw that the previous attachment showed a pop-up. Here is an attachment with a more visual view of the screen I am seeing.

    Attached files:  Scherm­afbeelding 2024-08-05 om 17.06.24.png

  •  2,281
    WebWizards replied

    Hi Nick,

    I've been looking at it further on the site and testing but I'm not sure what it could be unfortunately. I do see that even though some notices show, accounts cannot be registered.

    At this point I'm thinking maybe there is an internal error / some kind of plugin conflict, because at one point I tried registering an account and the site was showing me a blank page (characteristic of a fatal error).


    We'd like to troubleshoot and get this resolved for you, but unfortunately I don't think we can get any further with external tests. I can tell you I also don't believe this is some kind of general bug in B2BKing, as the plugin is currently active on over 10,000 sites, almost all of which also use the registration module.

    We'd really need access to a version of the site we can work on to troubleshoot this. I understand this can be sensitive. I would suggest maybe checking with your hosting to see if they have the ability to create a staging / development site to share with us - this is a relatively common feature that many hosting companies offer - such a site would be an identical clone, but disconnected from the real live site.

    Kind regards,

    Stefan

  •   nick replied privately
  •  2,281
    WebWizards replied

    Hi Nick,

    Thank you for sharing that,


    The backend on this staging site and the homepage seem to work normally for me and I can access them without issues:

    3561328752.png


    However, if I try to go to the account page to test the registration, I get this 404 error:

    6434152853.png

    Also get a 404 if trying to click 'edit with elementor' on the page in the backend:

    2702564756.png


    9377216912.png



    I thought to try creating a new account page:

    8096158477.png

    But I get the same 404 error for the new page.


    Then I realized actually all site pages seem to show this:

    https://www.loom.com/share/677330aa9c744ae0932836f552c753e5?sid=7e2961e7-e3de-4bc3-9676-0505f5fe7a59


    I tried various things, clearing caches, disabling plugins, but I cannot get this to work. Any ideas? I need to be able to test registrations so that I can make changes / check for errors / view effects.

  •  1
    nick replied

    Hi Stefan,

    Strange that this happened. I have reset the .htaccess file and for me all the pages are showing now. Could you check if this is for you the case as well. If so, I hope you can focus on the main problem at hand again.

  •  1
    nick replied

    Hi Stefan,

    Did you already get a chance to look at the main problem. Please keep me posted when you discover something new.

  •  2,281
    WebWizards replied

    Hi Nick,

    The site is working for me now, thank you.


    I've been doing a lot of tests and I am noticing some very odd issues around caching. I took a few videos:


    Video 1:  https://www.loom.com/share/c3c102dfb7064f54bacebdf6301d3fb1

    You can see that I have deactivated the B2BKing plugins completely.

    However, registering a new user, or logging into an account does not work.

    But then, if I go and disable Litespeed cache, suddenly I am logged in. So it looks like Litespeed is maybe delivering a cached version of that page (not the real live page where I'm actually logged in). And disabling litespeed suddenly lets it display the real page where I am logged in.

    Then, more odd issues though. Log out does not work. Clicking other account pages does not change the page.


    Video 2:  https://www.loom.com/share/e853f749b2b14121a5ad234af323f1ba?sid=9fde825d-0e16-41e6-a801-e69cca4f8292

    This video starts with both B2BKing and Litespeed disabled completely.

    The user is 'stuck' on the orders page, and clicking any other pages or clicking logout does not work.

    If we activate / deactivate litespeed and purge caches, ultimately we can log out / login, and get 'stuck' on a different "addresses" page.



    Based on this, I believe that there's a general caching configuration problem, possibly at the hosting level / hosting object cache. I think that connects to litespeed on the site and somehow also conflicts with B2BKing when it's enabled, but my impression is that the core of the issue is likely hosting caching settings.

    I would suggest to look at deactivating those completely via your cPanel / hosting.

    I also see you use Cloudflare so that could also be part of the problem depending on what settings you have there, as that can also deliver cached pages.


  •  1
    nick replied

    Hi Stefan,

    Thank you for investigating the problem, with detailed explanaition of the things you tested. I appreciate that. Based on your findings, I am going to get into contact with the hosting provider to see if we can get to a solution. Thanks again for all your help!