Jump to content

Comments not showing up


artaylor
 Share

Recommended Posts

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

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

@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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...