If an unregistered user/stranger try to view a post it says
"You must be registered or logged in to view the post".
We have a category (for private posts) to allow only some registered users to access some posts.
Even though posts are not included in that category, it shows the above message.
How to allow unregistered users/strangers to view public posts?
I did the following on my test server.
I disabled all the plugins and switched my theme to twentyeleven.
In that twentyeleven theme everything is fine - stranger can able to access posts.
When I switch the theme to our custom theme and without enabling the plugins, the issue re-occurs.
Then I thought that the problem is not with plugin so I tried to compare the theme code with an early release and found that it is the same as before.
I loaded a old DB backup in the test server and I was surprised that it worked correctly!
When I tried to recreate the missing posts between the old DB and current DB, I got the same problem.
It is strange and I felt happy when I traced the problem in the DB and now I have lost the confidence of tracing the bug.