Posted by wattanmalik on December 14, 2012 at 9:04am
Hi
I would like to share solution for the comments from anonymous user not displaying on the node and also not displaying in comments section of admin after login with admin.
But when user comments and posts stored into database.
Please follow the steps:
- first check with the permissions to the anonymous user for comment post.
- If anonymous user has permission for post comment.
- check database comments table whether comment is saved in database or not.
- if saved then check in database whether there is any user with uid '0' or not, because by default in drupal there are two types of user : admin with uid '1' and anonymous user with uid '0' ,and user with uid '0' is required to display posts and comments made by anonymous user.
- if no user with uid '0' found then create a user with values:
- insert into users (uid,mode,sort,threshold,signature_format,created,access,login,status,timezone,data) values ('0','0','0','0','0','0','0','0','0','NULL','NULL');
- if user not created with uid '0' then update that user set uid '0'.
Now all the posts made by anonymous user will be displayed to admin in comments or directly to corresponding nodes.
Thanks.
Hope will help someone who is searching for this problem because i had already spent 2 days for debugging this problem.