Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

No Post Content Displays in Comments Page 2

I'm not sure if this is an intended design or a bug but is there a reason why no post content appears when a user is taken to the second page of comments (or any page other than the first). For example, if a logged in user clicks on "Popular Discussions" they are directed to the last comment in the series. If there are multiple pages of comments the original post content does not show up. Is there any logic to this, and is there any way to make the post content appear on ALL comment pages?



  • Options
    hgtonighthgtonight ∞ · New Moderator

    That is by design. You can easily change this via a view override in your custom theme (don't have one? check out the quickstart).

    Copy the file from /applications/vanilla/views/discussion/index.php to your custom theme (/themes/themeName/views/dicussion/index.php).

    Then you want to remove the check for first page and just always spit out the discussion body.

    Original code:

    // Write the initial discussion.
    if ($this->data('Page') == 1) {
        include $this->fetchViewLocation('discussion', 'discussion');
        echo '</div>'; // close discussion wrap
    } else {
        echo '</div>'; // close discussion wrap

    Modified code:

    // Write the initial discussion on every page
    include $this->fetchViewLocation('discussion', 'discussion');
    echo '</div>'; // close discussion wrap

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    Thank you @hgtonight . I appreciate this info!

Sign In or Register to comment.