• Greetings gurus. I’m having a bit of an issue with the comments in my first wordpress theme. It appears that if I post a comment into the first article the same comment(s) will show up in every other article. I’ve looked through the comments.php and didn’t notice anything unusual.

    I’m building off of Starkers clean slate and the link to the actual worksite is here.

    Is there something missing off the bat, like a unique identifier for tying the comments to the article? Any help would be appreciated, thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • <input type="hidden" name="comment_post_ID" value="1" /> **
    if you look at your source for differnet permalink pages, you will notice they all have that. at least the 2 posts I looked at have that.

    that’s not right. That value is dynamically generated — its the post ID, and every post has a different one.

    the corresponding line, inside your theme’s comments.php, the way it ought to be is like so:

    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />

    note also that the two 2.6.2 themes contain this:

    <?php do_action('comment_form', $post->ID); ?>

    that hook above, is added before the closing </form>`

    For more info, and to see what a working comments.php looks like, look inside either of the 2 themes that ‘ship’ with WP.

    If your comment.php looks right, and the unedited stalker theme I looked at has it done right, then you need to disable pretty permalinks and determine why the post_id is being set to 1 for all posts. I say disable permalinks, because the default permalink also uses that, so it might narrow down whether or not its a global problem.

    ** I edited that to reflect whats really in the source, rather than what FF tells us is in the source. believe it or not, FF likes to “order” things around.

    https://www.supremevictory.com/WP/?p=5

    I assume thats going to the right post_id though … so its probably the changes youve made to the theme.

    for what its worth,

    have you looked at these:

    https://www.supremevictory.com/WP/?p=3
    https://www.supremevictory.com/WP/?p=4

    I dont like how revisions come up, and Ive never noticed that before.

    thats kinda “eww”.

    Thread Starter panthersweat

    (@panthersweat)

    Thanks for the quick response, whooami.

    I can definitely follow with you and see what you’re talking about near the submit button. The code you listed is just as you mentioned.

    <input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
    <?php do_action(‘comment_form’, $post->ID); ?>

    Any idea why the ID wouldn’t get passed? Quite mysterious! I tried punching in <?php echo $id; ?> within the content to see what the variable was at, but it doesn’t display a number on the page.

    Thread Starter panthersweat

    (@panthersweat)

    Ew indeed! That’s quite strange. I didn’t touch the theme too deep other than applying div tags to throw columns around. Do you have an insight as to what would have caused this gross formatting?

    well, this is what I would do..

    switch to one of the defualt themes, see if that doesnt solve the comments issue. I know you said the comments.php looks right, but change themes to make sure.

    as for the revisions being seen.. what are those posts? one is a revision, yes, and the other?

    I’ll be honest and say Ive never seen that before, but then, Ive never poked around on a 2.6.x site like that before.

    Maybe its just the way things are, I honestly dont know.

    I tested that on the demo on opensource CMS

    https://demo.opensourcecms.com/wordpress/?p=2

    thats a draft of this:

    https://demo.opensourcecms.com/wordpress/?p=3

    notice that that isnt behaving like yours. (Those links will expire, OSC resets the demos every 15 mins or something)

    I cant speak to the cause of what that is, or if its related to the original problem.

    What plugins, if any, are you using?

    Thread Starter panthersweat

    (@panthersweat)

    Good call. I switched back to the Kubrick theme and did see the corrections made. Was hoping you would know about those revisions, at this point we’re both lost when it comes to that garbage. ??

    Thanks for your help, whooami. I’ve learned my lesson thanks to you and will be starting over again fresh.

    Thread Starter panthersweat

    (@panthersweat)

    That’s quite strange. What’s up with that demo? Here are my plugins;

    • Askimet 2.2
    • Hello Dolly 1.5

    well

    now that youve put that unedited theme back (I assume thats the clean one) your defualt permalinks are behaving normally too:

    https://www.supremevictory.com/WP/?p=10

    thats what ought to be there, thats what you want.

    What’s up with that demo?

    what do you mean?

    its a demo ?? its for people that want to test drive wordpress without installing it.

    Opencms has lots of different apps there you can check out. Its handy, very.

    Thread Starter panthersweat

    (@panthersweat)

    You assumed correctly, I just threw the barebones theme back on there and it works just as it should. Fingers can definitely point me to blame, the only mystery is why. The demo part made sense but I didn’t understand the concept of the revision being so misaligned. Great site by the way.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Comments spilling over’ is closed to new replies.