With "anonymous user" "access comments" permission checked, instead of getting the expected "Login or register to post comments" links, i'm getting the word "Array". Not sure when this started happening but I've disabled all contrib modules with the exception of core-required and comment, switched to the default Garland theme and the only change is that it no longer outputs the word "Array"; it outputs nothing. Adding the code <?php print_r($node->links); ?>
to Garlands node.tpl file reveals the following output:
Array
(
[comment_forbidden] => Array
(
[title] =>
[html] => 1
)
)
Adding the same code to my vanilla drupal 6.16 Garland node.tpl file outputs:
Array
(
[comment_forbidden] => Array
(
[title] => Login or register to post comments
[html] => 1
)
)
Anyone have any ideas as to what might be causing this?
Thank you,
Scott
PS. happening in Drupal 6.15 and now 6.16
I'm using:
MySQL v5.0.77mm0.1
PHP v5.2.9
Apache v1.3.41 (Unix)
Comments
I've got the same problem, no
I've got the same problem, no idea what caused this...
(subscribe)
One Solution
If "authenticated users" permission is unchecked so they can't post comments, Pete (http://drupal.org/user/61645) figured out that..."The problem was that authenticated users can't post comments. I eventually tracked the problem down to theme_comment_post_forbidden; if the authenticated user can't post comments, the function returns nothing!"
He added the following code to my theme's template.php file to override the word "Array" with "Subscribe to post comments":
Thanks Pete!
Scott
Thanks
@Sc0tt Been wondering where the heck the login or register to post comments went. Thanks for saving my sanity. Yes it is the lack of authenticated user being ticked. Been searching for hours.
BIG THANKS
venusrising