Users cannot see first post in each topic
-
Wordpress 3.7.1, bbPress 2.4.1
Users (all roles except Administrators) cannot see the first post in any topic, regardless of it being their own post or not. Changing forum role doesn’t do anything. Only making them Administrator on the wordpress site does. Tried setting default theme and disabling other plugins to no avail.
Not using Wishlist Member and never did. Unsure how to debug, and seen other topics strand with no solution.
-
Has this problem just started happening? have you upgrade or changed anything?
Is your forum public? If so can you post a link to it, so that we can see the problem
It is a new installation, and I noticed this after someone reported strange things happening. I had not seen it since I was using an admin account, so I can only assume it has always been like this, well, since Friday as that was when we went live.
The forum is not public although it is set to public in the forum. It is protected by functions that check for a site membership (Paid Memberships Pro). When I disable that functionality the behaviour stays the same. I can enable/disable by removing the respective functions. But can’t leave it open as people have personal details posted.
How would it be that an administrator (WP role) would see the first post but not any other role, regardless of the forum role set (I have not tried the Blocked one though)When I look in the database table for posts I see the post type of the first post is topic and the following are all of type reply. the menu order column seems to be the order for the posts to be displayed, first being 0. Changing that number to one higher than the current last reply doesn’t show anything different.
Could it be showing of posts of type topic is exclusive to administrators in some way?All first posts on an area are “topics” and the subsequent ones are replies, so it is correctly doing that.
These are called custom post types
User levels (eg admin) would/should not affect this
I suspect the issue is in your memberships plugin – even though you’ve tried. Do you anywhere define what is shown to users? if you can find the word “replies” anywhere then look for adding “topics” as well.
I’d suggest that you add a new user (yourself but under another name) and then play with the settings for both wordpress and bbpress. I presume you are aware that when you have created a user, if you go back into edit then you’ll see a bbpress role for each user. So play with both of those and see what displays topics and replies and then come back.
I have gone through those steps a number of times already, including removing the membership plugin. This membership plugin is not specific to bbpress. It has no awareness of topics and users and such. It is to restrict access to wordpress pages and posts.
The way the forum is protected is by this code: https://gist.github.com/strangerstudios/1633637
What it basically does is determine if it is going to show forum content or not and then either not show it at all and redirect to another page (in my case the home page) or continue and show whatever the forum is showing. It does not discriminate between topics or replies or whatnot from what I can tell.Again, disabling that bit, or disabling the membership plugin as a whole does not make a difference.
Walking through all forum roles: blocked shows a 404 page, all the others show the content except the first post (of type topic)
Walking through all wordpress roles: only administrator will show the first post (of type topic)
ok, lets try doing a repair on the forums to see if they’ve lost the relationship somewhere
Dashboard>tools>forumsI’d work my way down the first 6 – maybe one at a time to ensure you don’t get hours of spinning discs.
The code you provided to protect does have a section where it is working out whether to show a post, topic or reply, and the code for each is slightly different (starts at around line 40). I’m not good enough ton validate this code, but if you’re still stuck, always worth contacting the codes owner to see if they can help
I had already done all the repairs too, even locked me out when I was remapping existing users to forum roles, got that back by editing in the db though using a backup.
I have looked at the code and what it does in the end is return true or false in every case, resulting in the showing or not showing of the whole page, not forum elements. And disabling that code completely just skips the check, done that several times, but it didn’t make a difference.
ok, so apart from suggesting you re-install bbpress – I’m out of ideas !
Any available solution for this?
The issue on my site had to do with a setting in WishList Member. For me I had to go to WishList Member >> Settings >> Protection Defaults and then set the “Only show content for each membership level:” and set to “No”.
After I did that it worked.
I still have the problem on my site, and am not using WishList Member.
I tried a clean install with all plugins I am using, and maybe the order of installing was different, but on the clean install I had no problem, until I did a database restore. Something in the db messes it up. I can’t see where in the code the showing of the first post (or any) is checked against some condition.
Did the past updates of bbpress and other plugins too (not the latest wordpress though) and the behavior is still the same.
I’m a total newbie, but this worked for me, sort of. It allows you to view the first post, provided you clicked on a menu item to get there, like if you were a visitor to the site. If you try to see it from the admin dashboard Forums, the first post won’t show up.
Make a new topic. Give it the same name you will give to the Forum itself. Make it sticky. Publish.
Make a new forum. In the text field, click the link button. A list should appear. Link to the topic called whatever you called it. On the next line, write your first post. Copy that post text to use later. Publish.
Make a new page called Forum, and put that new page in a menu.
Edit the page called Forum (we’re not editing the forum itself, just the page called Forum): In the text field, click the link button. Link to the topic. Publish. Then paste the text that you copied from the forum. Publish.
View the page called Forum. Then view the Forum directly from the dashboard.
If that doesn’t work, try Settings > Permalinks > Save Changes.
Please let me know if any of these steps is unnecessary.Do you have a site link we can take a look at?
Hi, i confirm that the solution offered by catalyna may work for those who have installed a membership plugin (s2member, wishlistmember, optimizepress). The issue seems to be with the way these plugins manage the searches. They seem to catch on the fly the searches to hide content, and can create a conflict of compatibility with some other plugins like bbpress which need to display content based on roles. Plugins like S2member (or optimizepress, based on s2member) allow deactivating of this without creating any major issue for the membership site. For those using optimizepress, it can be done thanks to the alternative view protection feature in OP. I only unchecked “Searches”, and the problem disapeared, which would confirm this idea that the issue comes from the way that searches are handled by the membership plugin.
- You must be logged in to reply to this topic.