Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6610423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:50:20+00:00 2026-05-25T19:50:20+00:00

I have a Drupal 7 installation with a default front page and a few

  • 0

I have a Drupal 7 installation with a default front page and a few article nodes “promoted to the front page”. These are displayed as teasers and in node–article.tpl.php I have a template for my teasers and this all works fine. The node teasers display as expected.

On each teaser there is a link that says “View full story”.
I want to use Ajax to expand the teaser into the full story in place on the home page (I have some fancy animations etc but that’s besides the point)

So I have a custom module that accepts a nid parameter, loads the node, and returns it to my javascript/jQuery. I am using the jQuery.load() function to make this request.

This again all works fine, the teaser is replaced by the full node version which uses the same node–article.tpl.php to define it’s appearance.

The trouble is, I have comments enabled on articles and on an individual articles page the form and comments show up fine, but when loaded via ajax as described above, the comments don’t appear along with the rest of the full node.

Is this due to it being the front page? I have print_r‘d the $content array and I don’t see the comments there at all. Is there a simple workaround for this or am I going to have to write a little module to manually grab the comments and comment form and append them to my nodes after loading?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:50:21+00:00Added an answer on May 25, 2026 at 7:50 pm

    The problem is that node_load (which I assume your module uses) does not load the comments. You’ll need to modify the module so that it grabs them, something like:

    $comments = db_select('comment','c')
                           ->condition('nid', $nid, '=')
                           ->execute()
                           ->fetchAssoc();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly new drupal installation with a few hundred nodes. I moved
I have approximately 60.000 nodes in my Drupal installation. They are all unpublished, and
I have a Drupal 6 multilanguage installation and I want to filter the nodes
I have a multi-site Drupal-6 installation containing websites of different customers. On each site,
I have a Drupal module page where I am populating a form with a
I have a drupal installation in the root directly of my domain with clean
If I disable pathauto in my Drupal installation, am I going to have any
I'm using Table Wizard + Migrate module to import nodes into my Drupal installation.
I have a form that uploads a file to my Drupal installation. I want
I have two machines on amazon ec2, one with a drupal installation and another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.