Jump to content

Recommended Posts

Posted

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

Posted

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?

Posted

@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.

Posted

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. 

Posted

@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/).

Posted

Have you enabled caching? I've ran into some issues before comments not saving when I enabled cache on the template.

Posted

@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?

Posted

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.

Posted

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. 

Posted

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');
 

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
  • Recently Browsing   0 members

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