Today I came across a unique problem. I was working on a Drupal website for one of my clients and there I was required to create a page to show testimonials for the site. For this very purpose I decided to use comments feature of Drupal.

The problem I came across is that writing comment was working perfectly, but the comments written by anonymous users were not being shown up on the page. I checked the permissions and also checked whether the comments are being added to the approval queue. But every thing went in vein. Every thing was correct, comments were being added to the database but neither being shown on testimonials page nor being added to approval queue. Finally after googling I found out the solution and it was interesting to know.
First the fact about the Drupal: drupal uses a user, whose id is 0 as anonymous user.
Now the solution of the problem: You have to have a user with user id as 0 in your database. Otherwise it does not show any comments of anonymous users. So, if you are suffering from very same problem, then go to your database, browse users table and see if you have a entry as uid = 0 in your table. If not, then do one and the thing will start working.
Enjoy Coding!

Leave a Reply

Your email address will not be published. Required fields are marked *