advanced-forum.naked.post.tpl.php and many similar templates have this structure at the front of the page:

<div id="node-<?php print $node->nid; ?>

This result in many DIVs on the page having the same ID, which is contrary to HTML standards. Please, add something unique like the comment.cid.

CommentFileSizeAuthor
#1 af7_1367808.patch1.32 KBtroky
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

troky’s picture

Status: Active » Needs review
FileSize
1.32 KB

Check this patch.

djg_tram’s picture

Just as good. On a site I used "notes-{nid}-{cid}" but anything that makes it unique is just fine.

troky’s picture

Version: 7.x-2.0-rc1 » 6.x-2.x-dev

$post_id variable was already defined in preprocess function and gives "post-{nid}" for nodes and "post-{cid}" for comments.

6.x-2.x branch should be affected, too.

Michelle’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

Nope and I double checked to be sure. 6.x has:

<div id="<?php print $post_id; ?>" class="<?php print $all_classes; ?>">

No idea why it wasn't that way in D7 unless maybe it was fixed after you ported.

Michelle

troky’s picture

Thanks for checking this Michelle. My fault in porting process probably.

Michelle’s picture

I don't remember when that got fixed but I do know it was broken in 6.x at one point so my guess is it was fixed after you ported and didn't get marked to port the fix. So probably my fault in that case. ;)

Michelle

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Typo