Mantis doesn't validate XHTML -- not even close
Moderators: Developer, Contributor
Mantis doesn't validate XHTML -- not even close
I have embedded Mantis into my site, www.synsport.com, as I assume many others have. Normally I code all my web pages XHTML 1.0 Strict, but due to PHPBB (XHTML valid skin) and Mantis I had to drop down to XHTML 1.0 Transitional. Today I performed a validation check on my site using W3C validator and received a lot of errors, serious errors like nested forms, unclosed form tags, illegal tags, etc. Then I came to this site and performed a validation check on the mantis instance here, with the same results.
Has nobody bothered to validate these generated pages? This isn't a case where it was valid, then a tweak broke it. Are people aware of this, and is there any intention on providing XHTML 1.0 Transitional pages which the doctype dictates?
Has nobody bothered to validate these generated pages? This isn't a case where it was valid, then a tweak broke it. Are people aware of this, and is there any intention on providing XHTML 1.0 Transitional pages which the doctype dictates?
Initially Mantis was generating HTML and we did a lot of work to move it to XHTML. However, we haven't yet made it pass the validator checks. I would be happy to provide the appropriate access for someone to be able to commit changes that fix such XHTML compliance issues.
Migrate your MantisBT to the MantisHub Cloud
Would it be easy for your to provide me with modified files against 1.1.0a2? I won't be applying XHTML compliance changes to 1.0.x branch and hence having it against the other branch will make it easier to apply.
Migrate your MantisBT to the MantisHub Cloud
honestly it would not be "easier" - since my production server is running 1.0.6, it would be "easier" to fix that and deliver the updated files.
I could be persuaded to update the production server to the latest beta if it was rock solid stable. However, I just read a post that a3 is coming out so I would wait until after then anyway.
so I'm kind of stuck -- I don't really want to install a dummy version especially since my dev server (at home under my desk) crapped out with a bad hard drive and I don't want to screw up a productive version either.
I could be persuaded to update the production server to the latest beta if it was rock solid stable. However, I just read a post that a3 is coming out so I would wait until after then anyway.
so I'm kind of stuck -- I don't really want to install a dummy version especially since my dev server (at home under my desk) crapped out with a bad hard drive and I don't want to screw up a productive version either.
The nested form problem is a nasty one.
I'm talking about the table of filters, for example, on the view all bugs page.
Here's how it's currently set up (briefly):
You can't do that.
The first </form> has to be outside the table.
The three options to fix this are:
How would you like this fixed?
I'm talking about the table of filters, for example, on the view all bugs page.
Here's how it's currently set up (briefly):
Code: Select all
<form>
<table>
{many rows}
<tr>
<td>search</form>
<td>test</td>
<td><form>reset filter</form><form>save filter</form></td>
</tr>
</table>
The first </form> has to be outside the table.
The three options to fix this are:
- close the table, then the first form after the SEARCH option. Reset filter and save filter are outside this table, maybe in their own table below it.
- Change the code for save/reset filter to not require to be a form -- maybe use url variables instead of post variables. requires code change
- piggyback save/reset filter on the same form. There's no problem having 3 submit buttons for one form. requires code change.
How would you like this fixed?
Option 3 while maintaining the same look and feel is fine by me.
Migrate your MantisBT to the MantisHub Cloud
Just an update here -
Option 3 is not going to work. First, there are more than 3 forms involved. There can also be a list of filters and a manage filters form. Secondly, there are at least 3 unique form targets.
One approach would be to use javascript to manipulate the master form values, including changing the form target. It gets a bit messy as the forms may or may not have add the variables defined, and some use variables commonly. In the case of the filter, it's both a dropdown and a hidden value.
For now, I'm going to fall back to trying to change the html elements with an attempt to maintain the current look.
Option 3 is not going to work. First, there are more than 3 forms involved. There can also be a list of filters and a manage filters form. Secondly, there are at least 3 unique form targets.
One approach would be to use javascript to manipulate the master form values, including changing the form target. It gets a bit messy as the forms may or may not have add the variables defined, and some use variables commonly. In the case of the filter, it's both a dropdown and a hidden value.
For now, I'm going to fall back to trying to change the html elements with an attempt to maintain the current look.
Okay, I have fixed this with the HTML only. Please see here:
http://www.synsport.com/mantis/view_all_bug_page.php
This page validates and as far as I can tell, the filters work normally and *appear* to look as before. I did struggle to make it work in Firefox, Opera, IE 6, and IE 7 equally, but I finally did it.
Also note that the filter table had the colspan set incorrectly on the 5th and 6th row, 5th column. It was spanning 2 instead of the fourth column.
Honestly - it's terrible that the presentation and the code are mixed together like this. Splitting presentation out is what templates are for - this code is quite unnecessarily complicated due to having HTML conditions dispersed everywhere.
http://www.synsport.com/mantis/view_all_bug_page.php
This page validates and as far as I can tell, the filters work normally and *appear* to look as before. I did struggle to make it work in Firefox, Opera, IE 6, and IE 7 equally, but I finally did it.
Also note that the filter table had the colspan set incorrectly on the 5th and 6th row, 5th column. It was spanning 2 instead of the fourth column.
Honestly - it's terrible that the presentation and the code are mixed together like this. Splitting presentation out is what templates are for - this code is quite unnecessarily complicated due to having HTML conditions dispersed everywhere.