Bug showing wrong user logged in  

  RSS

Hello2019
(@hello2019)
Active Member
Joined: 9 months ago
Posts: 9
22/03/2019 3:44 am  

I have set up your plugin on normal WP posts as well as two CPTs that I have. On these CPT pages, the plugin has a bug.

 

A post in question can be found here. The comment box shows that I am logged in as a user who isn’t me. It shows this even if you’re not logged in, so you probably see it as well. This user is the author of the post of my CPT. Your plugin is mixing something up here. It automatically shows the post author as the user you are logged in as.

 

I‘d appreciate it if you could help me troubleshoot and fix this! Thanks Smile

This topic was modified 9 months ago 2 times by Hello2019

Quote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3480
22/03/2019 11:40 am  

Hi @hello2019,

This is not the wpDiscuz issue. It comes from another plugin.  To find the problem maker plugin please deactivate them one by one and check after each deactivation. 

Please keep the cache plugin deactivated during the testing process. 


ReplyQuote
Hello2019
(@hello2019)
Active Member
Joined: 9 months ago
Posts: 9
22/03/2019 9:30 pm  

Hi @Astghik!

 

We can't turn off the plugin that could potentially interfere with yours because if we do we can't see the page where the comments are loaded. Our plugin creates custom pages like the one linked to in my first post. 

It doesn't do much with comments except that it loads the comment template after the content of the post. It looks like this here:

 

        <?php

// If comments are open or we have at least one comment, load up the comment template.

if ( comments_open() || '0' != get_comments_number() ) :

/**

* generate_before_comments_container hook.

*

* @since 2.1

*/

do_action( 'generate_before_comments_container' );

?>




<div class="comments-area">

<?php comments_template(); ?>

</div>




<?php

endif;




endwhile;




/**

* generate_after_main_content hook.

*

* @since 0.1

*/

do_action( 'generate_after_main_content' );

?>

 

It looks like, for some reason, the plugin author is called instead of your own username.

This post was modified 9 months ago by Hello2019

ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3480
23/03/2019 12:55 pm  

Hi @hello2019,

Please deactivate the wpDiscuz plugin and check again. Let us know how it works without the wpDiscuz plugin. 

You can deactivate and activate those without any worry. The plugin doesn’t affect any data. You can install and uninstall whenever you want.


ReplyQuote
Hello2019
(@hello2019)
Active Member
Joined: 9 months ago
Posts: 9
23/03/2019 7:00 pm  

Hi @Astghik,

 

thanks for your help. The issue isn't present when we deactivate the wpDiscuz plugin. I've uploaded a screenshot to show what I mean:

Screenshot

 

The issue we have is in the circle at the bottom ("You are logged in as…"). This username is wrong, as you can see in the circle at the top right, I am logged in as "Admin". The wrong username it says I am logged in with is the username of the author of this post (which is a Wordpress Custom Post Type).

When I turn off wpDiscuz, I can't check if it works or not because it's a feature from wpDiscuz that my site doesn't have, so when I turn it off, it's gone. The link on that username is wrong too. All the usernames on our site have this type of link: https://logicbenchmarks.com/forums/users/admin

The wrong username in question links to this kind of page: https://logicbenchmarks.com/author/admin/

 


ReplyQuote
Hello2019
(@hello2019)
Active Member
Joined: 9 months ago
Posts: 9
26/03/2019 4:26 am  

Hi!

 

I would love to know if you found something in your code or if there’s a fix for this yet! We’ve gone through all possible culprits, bypassing parts of code piece by piece, but it changed nothing for us. Remember that we use Custom Post Types, maybe the issue lies there? It works normally on all other pages that are not CPT.


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3480
26/03/2019 3:47 pm  

Hi @hello2019,

We couldn't find such an issue on all our test websites. This is something specific on your website. Please install and activate the Duplicator — WordPress Migration Plugin, backup your WordPress site and send it to info[at]gvectors.com email address, to allow us to debug the issue. 


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3480
29/03/2019 12:13 pm  

Hi @hello2019,

You've sent us not all files. it includes a DB with installer.php but not the files. We'll need the files as well. 

Please try the steps mentioned in this video instruction: 


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3480
07/05/2019 12:00 pm  

ok @hello2019,

Please provide us the admin login details and confirm us to backup your website. Some files are missing in the folder you've sent us. 


ReplyQuote
Share:
Green
Default
Pear
Black Emo
{green}:grinning:
{green}:wink:
{green}:face:
{green}:inlove:
{green}:sweaty:
{green}:surprised:
{green}:lovekiss:
{green}:laugh:
{green}:formalsmile:
{green}:displeased:
{green}:cool:
{green}:resent:
{green}:nerd:
{green}:screaming:
{green}:amazed:
{green}:sad:
{green}:deceitful:
{green}:starryeyes:
{green}:evil:
{green}:shocked:
{green}:tears:
{green}:sulky:
{green}:smile:
{green}:vomited:
{green}:hi:
{green}:afraid:
{green}:crazy:
{green}:rabid:
{green}:fighting:
{green}:nonoise:
{green}:blushed:
{green}:idontknow:
{green}:scared:
{green}:razz:
{green}:kiss:
{green}:eat:
{green}:shutmouth:
{green}:gape:
{green}:suspicious:
{green}:laughingoutloud:
{green}:bruise:
{green}:crying:
{green}:pray:
{green}:serious:
{green}:excitement:
:)
:d
:wink:
:mrgreen:
:neutral:
:twisted:
:arrow:
:shock:
:???:
:cool:
:evil:
:oops:
:razz:
:roll:
:cry:
:eek:
:lol:
:mad:
:sad:
:!:
:?:
:idea:
:hmm:
:beg:
:whew:
:chuckle:
:silly:
:envy:
:shutmouth:
{pear}:happy:
{pear}:smile:
{pear}:laugh:
{pear}:laughingoutloud:
{pear}:crying:
{pear}:exhausted:
{pear}:nerd:
{pear}:surprised:
{pear}:veryhungry:
{pear}:wink:
{blackemo}:laughtertotears:
{blackemo}:gift:
{blackemo}:love:
{blackemo}:inlove:
{blackemo}:shamefaced:
{blackemo}:heart:
{blackemo}:crazy:
{blackemo}:anguished:
{blackemo}:bruise:
{blackemo}:easymoney:
{blackemo}:exhausted:
{blackemo}:vampire:
{blackemo}:shutmouth:
{blackemo}:wink:
{blackemo}:carnival:
{blackemo}:flowers:
{blackemo}:hotdrink:
{blackemo}:party: