artaylor Posted April 22, 2013 Share Posted April 22, 2013 Hi, Trying to get comments to work. I have followed the instructions in the API and the comment form appears but once entered the comments do not show up. Here are the field settings: Comment Moderation: none Notification Email: xxx@gmail.com - no email gets to this address Use Website...: Unchecked Redirect ... : Checked Send Email Notification on Span: Unchecked Use Gravatar: PG Use Askimet: Unchecked Comment field is used in 2 templates and each one has basically the following code: <div class="comments"> <?=$page->comments->render(); ?> <?=$page->comments->renderForm(); ?> </div> <!-- /comments --> As mentioned earlier, the Form shows so it is finding the comments field, but the comments themselves do not show. I am sure this is a newbie oversight on my part. Thanks Link to comment Share on other sites More sharing options...
adrian Posted April 23, 2013 Share Posted April 23, 2013 artaylor, Not really sure if this is related or not, but the instructions for setting up the comments module are missing a step. Did you add the new comments field to the template for the page? Link to comment Share on other sites More sharing options...
artaylor Posted April 23, 2013 Author Share Posted April 23, 2013 @adrian - thanks for the suggestion. I do have the field on the templates. As mentioned, I am getting the form to show, just not any actual comments. Link to comment Share on other sites More sharing options...
ryan Posted April 28, 2013 Share Posted April 28, 2013 Do you see posted comments on the backend? Try moving your renderForm(); somewhere before any output occurs, and stuff the result in a variable that you can output later. For example, try this somewhere before any HTML output: $commentsForm = renderForm(); Then in your comments rendering: <div class="comments"> <?=$page->comments->render(); ?> <?=commentsForm ?> </div> <!-- /comments --> Not sure this is ultimately necessary, but it might help to isolate the issue. Link to comment Share on other sites More sharing options...
artaylor Posted May 2, 2013 Author Share Posted May 2, 2013 @Ryan: Thanks for the assist. Followed your suggestion -- although I changed the line to $commentForm = $page->comments->renderForm(); I am still getting the same result. No comment, no pending comment, no email. The form shows up as expected. The site can be seen at: www.christianmoran.com. There are comments setup for each film (http://christianmoran.com/watch-the-films/ayahuasca-diary/) and in the discussion section (http://christianmoran.com/discuss/welcome-to-my-world/). Link to comment Share on other sites More sharing options...
arjen Posted May 4, 2013 Share Posted May 4, 2013 Have you enabled caching? I've ran into some issues before comments not saving when I enabled cache on the template. Link to comment Share on other sites More sharing options...
artaylor Posted May 4, 2013 Author Share Posted May 4, 2013 @arjen: Thanks for the assist. The setting Output Caching is set to 0 in the templates that call the comments. Is that what you meant or is there somewhere else that you set caching for templates? Link to comment Share on other sites More sharing options...
arjen Posted May 4, 2013 Share Posted May 4, 2013 0 means it isn't set so you might want to look in another direction since it doesn't seem to be caching that is causing your issue. Link to comment Share on other sites More sharing options...
ryan Posted May 7, 2013 Share Posted May 7, 2013 Art, could I look at the relevant template files? If you don't want to attach them here, feel free to PM them to me. Link to comment Share on other sites More sharing options...
artaylor Posted May 13, 2013 Author Share Posted May 13, 2013 @Ryan (It is Anthony, btw, art are my initials). Here are the files that apply. If you need anything else or need admin access to the site, let me know. Thanks for taking the time to help with this. template-files.zip Link to comment Share on other sites More sharing options...
ryan Posted May 14, 2013 Share Posted May 14, 2013 In film.php, try changing this: include('./includes/head.inc'); $commentsForm = $page->comments->renderForm(); To this (just reversing the order): $commentsForm = $page->comments->renderForm(); include('./includes/head.inc'); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now