Minor HTML validation error caused by no TR tag
Posted Jul 25, 2012 - 1:15 PM:
I noticed that certain pages with <table class="standardtable"> did not pass HTML validation because there is a missing <tr> tag.
I fixed it by editing /classes/template.php On line 368: if ($cols) $build .= '<table class="standardtable"> Changed to: if ($cols) $build .= '<table class="standardtable"><tr>
Seems to have corrected the problem. I found this error after I had already made some template customizations so this might not be present in the default template.
It looks like the <tr> is present for reciprocal links but missing for regular links. Closing </tr> is present for both. If I make the change you suggest, the reciprocal links area gets a double <tr><tr>. Working on determining the correct solution... changing line 408 of includes/displaycat.php to if (($next == $start && $settings->mixrecip == 'no') || ($next != $start && $linkcolumns != 0)) $links = '<tr> '. $$templatename; seems to do the trick, applied for next release.
My directory only uses regular links so that would explain why I didn't see any extra <tr> with my fix. I'll remove my fix and update with the next release. Thanks Paul.
0/5
1
2
3
4
5
Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.
Comments on Minor HTML validation error caused by no TR tag
Member
Usergroup: Customer
Joined: Feb 18, 2008
Total Topics: 8
Total Comments: 31
Posted Jul 25, 2012 - 1:15 PM:
I noticed that certain pages with <table class="standardtable"> did not pass HTML validation because there is a missing <tr> tag.
I fixed it by editing /classes/template.php
On line 368:
if ($cols) $build .= '<table class="standardtable">
Changed to:
if ($cols) $build .= '<table class="standardtable"><tr>
Seems to have corrected the problem. I found this error after I had already made some template customizations so this might not be present in the default template.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It looks like the <tr> is present for reciprocal links but missing for regular links. Closing </tr> is present for both. If I make the change you suggest, the reciprocal links area gets a double <tr><tr>. Working on determining the correct solution... changing line 408 of includes/displaycat.php to if (($next == $start && $settings->mixrecip == 'no') || ($next != $start && $linkcolumns != 0)) $links = '<tr> '. $$templatename; seems to do the trick, applied for next release.
Member
Usergroup: Customer
Joined: Feb 18, 2008
Total Topics: 8
Total Comments: 31
My directory only uses regular links so that would explain why I didn't see any extra <tr> with my fix. I'll remove my fix and update with the next release. Thanks Paul.