Bug showing wrong user logged in
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 🙂
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.
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:
// 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' );
<?php comments_template(); ?>
* 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.
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.
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:
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/
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.
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:
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.