No name added when new visitor posts a question

We have an issue when a user who is either a new user, or, not logged in, posts a question using the Q&A plug.

The user's name is not attributed to the question posted, it is just blank (with a following 0) even after clicking the "Register/Login and Submit" button and then registering / logging in.

In the questions settings we have got:

"He is asked for registration" selected for "After Visitor Submits a Question or Answer" and

"Immediately publish questions and answers (Otherwise they will be saved as pending) " is ticked.

We would like all new users to be able to browse the Q&A forum without logging in, and only have to log in if they are posting a question, so that the question can be attributed to that user.

What I think is happening is that, as the user is not logged in when the question is submitted, the question is stored in the database with no user assigned. Upon logging in or registering using the "Register/Login and Submit" button there is no longer a link between the user and the question so it is never assigned to that user.

Is it possible to allow a user to browse the site and their name to be assigned to that question when they click "Register/Login and Submit" whilst adding a new question?

Thanks

  • Jack Kitterhing
    • Code Norris

    Hi there @David,

    Hope you're well today! :slight_smile:

    It should be working like that out of the box, could you upgrade to the latest version please and then grant me support access please via your wp-admin > WPMU DEV > Support > Support access and click "Grant Access".

    Thank you!

    Kind Regards
    Jack.

  • David
    • WPMU DEV Initiate

    I have upgraded but, although the issue appeared to be fixed at first, it soon recurred as you can see at https://support.citizenmaths.com/questions/logging-in-to-study/

    The only workaround we can find to this is to assign questions and answers to users via the admin interface.

    I have granted you access.

    We also have some questions not being published and being assigned 'pending' status, even though (as far as I can see) all relevant user roles have "immediately publish questions and answers" checked.

    Thanks, David

  • Jack Kitterhing
    • Code Norris

    Hi there David,

    Hope you're well today and thanks for the additional information.

    I've been testing this on my own site and have managed to replicate the same issue as your having here.

    The lead developer has been notified so we can get this issue fixed ASAP. :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • Hoang Ngo
    • Code Slayer

    Hi @David,

    I hope you are well today.

    It still working on my end here, I logged out, and then post a question -> register-> The name display up on my side.

    Could you please enable support staff login in WPMU DEV dashboard > support > support access > grant access, so I can take a look at your setting.

    Thanks!!!

    Best regards,
    Hoang Ngo

  • Hoang Ngo
    • Code Slayer

    Hi @David,

    Thanks so much for your information.

    Hmm, I have try a test question by using the button "Register/Login and Submit" and it still assigned back to me. You can check here
    https://support.citizenmaths.com/questions/

    I have tested in both case new user/login back, both still working for me :slight_frown:.

    But we still have the question without owner, so I think this is another case, can you please provide me the step by step you getting that?

    Thanks!!!

    Best regards,
    Hoang Ngo

  • David
    • WPMU DEV Initiate

    Thanks.

    Please do not post any questions on our live site without asking first.

    I am aware the problem is an intermittent one.

    Have you spoken to Jack Kitterhing about this? As he mentioned above, he has replicated the problem on his own site, so hopefully he could provide you with details.

    From memory, the problem last occurred when I was replying to a question. After writing the reply I clicked "Register/Login and Submit" (because I was using a browser where I had been logged out). I think I then clicked the Connect with Google button to authenticate and login (we are using the WordPress Social Login plugin). You will see the reply was attributed to user '0' (though my subsequent reply, when I didn't need to log back in, was attributed to me). I hope that helps.

  • Hoang Ngo
    • Code Slayer

    Hi @David,

    I do apologize for the posting test question :slight_frown:.

    So the issue now is because the QA plugin not really support for the WordPress Social Login plugin. I will check the code again and will try to get a way making both plugin play nice together.

    Thanks so much for your patience.

    Best regards,
    Hoang Ngo

  • David
    • WPMU DEV Initiate

    When you say it's because of the WordPress Social Login, can I check that Jack Kitterhing was only able to replicate the problem when he was using the WordPress Social Login? I ask because I'm surprised he didn't mention it if that was the case.

    thanks, David

  • David
    • WPMU DEV Initiate

    Please could I have an update to, first, the message 5 days ago from Hoang Ngo about checking the code of the plugin, and, second, the question I raised, also 5 days ago, about whether the problem has only been replicated with WordPress Social Login?

  • Jack Kitterhing
    • Code Norris

    Hi there @David,

    Hope you're well today! :slight_smile:

    Thanks for your patience on this, I've tested and have replicated using any social login plugin, but also the standard login/registration functionality and have replicated the issue.

    I've sent a email to @Hoang Ngo with my site details so he can replicate there.

    Thank you!

    Kind Regards
    Jack.

  • David
    • WPMU DEV Initiate

    Hi, it's nearly four weeks since this was reported, and nearly two weeks since the lead developer was away (is he/she back now?) and Hoang Ngo said he'd check the code.

    In the last 24 hours we've had people exploiting this bug to post spam on our Q&A site without any registration name/data to.

    Please could you step up the urgency of resolving this problem, and let me know today when you expect to have a solution?

  • Marko Miljus
    • The Incredible Code Injector

    Hi guys,

    I am unable to reproduce the issue when registering via regular WP registration / login form. I'll now setup social plugin and try it that way and let you know about the results soon.

    P.S. Also, I am waiting for Jack to describe how he managed to reproduce it that way.

    Cheers,
    Marko

  • David
    • WPMU DEV Initiate

    As we are continuing to get anonymous spam that exploits this bug (see attached screenshot for example), I hope you can understand my concern that my requests that this be pursued more urgently, and that some timeframe is given for finding a solution, are going unheeded.

    I would like to escalate this issue. Please advise how I can do so.

  • Jack Kitterhing
    • Code Norris

    Hi there @David,

    Hope you're well today! :slight_smile:

    Sorry about the delay here, I managed to replicate with Ultimate Facebook login, but the issue you've posted here is odd, as your questions are actually containing the same title etc, which shouldn't be possible.

    Can you send me the following please to further investigate.

    - In the subject field add "Attn: Jack Kitterhing"
    - Link back to this thread
    - Include admin/network access
    - Include FTP
    - Include any relevant URLS for your site
    - Include cPanel (for database access).

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    https://premium.wpmudev.org/contact/

    Thank you!

    Kind Regards
    Jack.

  • David
    • WPMU DEV Initiate

    Thanks, Jack,

    Some of these details will have to wait until tomorrow, as your message arrived Friday evening UK time, and the person who has all of these details doesn't work Mondays.

    In the meantime, please can you explain what you mean by "your questions are actually containing the same title etc, which shouldn't be possible"? I'm confused because I don't think we have questions with the same title. Please include relevant URLs

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.