Bug #316

[PATCH] Article not xhtml compliant when no trackbacks or comments

Added by Redmine Admin 1230 days ago. Updated 789 days ago.

Status :Closed Start :
Priority :Normal Due date :
Assigned to :tobi - % Done :

0%

Category :admin
Target version :2.5
Resolution :

fixed


Description

The article view read.rhtml creates ordered lists whether or not there are any comments or trackbacks. Thus, when there are no comments or trackbacks, the page is not xhtml compliant because you are not permitted to have an <ol></ol> without at least 1 nested <li></li>. This patch corrects this by adding unless @article.comments.empty? (and similar for trackbacks) at the end of the = content_tag(:ol ...) helper. Will attach the patch after ticket is created.

History

07/20/2005 08:30 PM - scott-sigkill-org -

Duplicate of #166, still mostly wrong. We can't remove the comment <ol> without breaking Ajax comment submission.

07/20/2005 08:54 PM - Redmine Admin

Sorry, didn't think to look at the closed comments. Perhaps I can take another look at the code and submit a patch that covers the Ajax bit as well.

07/20/2005 09:23 PM - Redmine Admin

Ok, so this patch correctly changes the ol/li to divs. All ajax functionality continues to work in Firefox including commenting, editing, and nuking. The article page is now xhtml compliant whether or not there are any comments. Just noticed the patch doesn't update the trackbacks, so be patient with me and i'll have the FINAL patch submitted in moments...

07/20/2005 09:28 PM - Redmine Admin

Ok, the last patch (xhtml-compliant-comments-trackbacks-with-ajax-R351.patch) should take care of both trackbacks and comments without breaking the Ajax comment post. Sorry for the multiple posts. Feel free to test at your leisure.

07/27/2005 09:32 AM - scoop -

It does break the semantic meaning of the tags though..

07/27/2005 04:53 PM - Redmine Admin

That's a value statement. IMO, comments are much more than simple list items. Each comment section (or division if you will) carries a bunch of data. I think it's abusing the html concept of a list item once you add several paragraphs in a comment. Also, it's a trade-off. The software seems to place a high value on xhtml compliance (given the links in the footer). A choice must be made whether xhtml compliance is a higher priority than keeping the semantic meaning of comments equal to list items. Again, personally, I'm ok with it because I see comments as much more. To me comments are to posts as posts are to a blog, and we don't have posts as list items within a giant ordered list on the home page.

08/07/2005 09:36 PM - t_huehn-gmx-de -

I'd very much prefer valid XHTML. I hope you find a way to achieve it.

08/26/2005 08:18 PM - scoop -

  • Status changed from New to Closed
  • Resolution set to fixed
(In r583) XHTML compliance commit:
  • Removed non-existant alt="" attribute on delcious sidebar title link
  • Don't display the trackback <ol> if there are no trackbacks to display
  • Render a hidden dummy <li> in the comments <ol> if there are no comments to display. This element is being removed dynamically if a comment is submitted via ajax.

Closes #177

Also available in: Atom PDF