Viewing some HTML sources produces output with warnings and errors Viewing some HTML sources produces output with warnings and errors
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Viewing some HTML sources produces output with warnings and errors

Started by kaptainkory, August 02, 2005, 04:18:15 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

kaptainkory

I'll track down these problems myself if no one else is inclined to do so, but some of the fixes could be a bit tricky and I just don't know the ins and outs of the code too well yet.

I've run the following page sources through Tidy with "Show warnings" and Accessibility Level set to "normal", with the following results:

"My profile" = 18 warnings, 3 errors
"Upload file" = 26 warnings, 1 error
"Categories" from admin mode = 512 warnings, 8 errors
"Albums" from admin mode = 21 warnings, 1 error

I could go on with other pages...  I'm not trying to get onto anyone's case, but isn't it time the HTML output was cleaned up a little?

A few months back I suggested using some of the awsome developer extensions available for Firefox and to start running the page sources through to correct the HTML output.  I got jumped on a bit for that suggestion because the "extensions I mentioned are of course well-known and used among the coppermine devs ;-)", but gee whiz.  If they are so well-known and used, why so many errors still?

Again, I'm not trying to get onto anyone's case, but clean code is good code, IMHO...and this should go for HTML output as well.

Thanks (and sorry for the mini-rant).

donnoman

The coppermine dev's HAVE cleaned up a lot of the underlying code, even though we are still finding problems.

Our goal is that Coppermine produces valid XHTML 1.0 transitional output with the default themes that come canned. (We can't be expected to go through all of the user supported themes, that is the responsibility of that themes author)

Our goal is NOT: Tableless CSS Only Layouts.

Tidy friendly code isn't on the agenda for 1.4, however if we can make small adjustments to conform to it's best practices it might be worthwhile.

If you can summarize some of the problems you are seeing on those pages lets talk about the issues and determine which ones should be a priority to fix.

kaptainkory

CVS devel from this morning.  Classic Theme.  I'm not going crazy here; just running basic HTML output through validation.  AND I've never even said ANYTHING about dumping all of the tables in favor of tableless CSS either, so I'm not sure where that's coming from?

"My Profile" warnings/errors attached.

As you can see this isn't just a long string of <table> summary warnings.  HA!  I'm granting you those, but the others?  "Tidy friendly" code aside, these look like VALIDATION issues to me.

In fact, I posted in another thread about validation of the "Search" page with similar problems.  I just pulled up your own search page and ran it through W3C validation (http://validator.w3.org/check?verbose=1&uri=http%3A//donovanbray.com/search.php).  And guess what?  Same validation problems.  (Unfortunately, I can't do the same check with these pages...but...)

It isn't anything "weird" on my machine; it just seems like everything I post I have to give screen-capture proof that something is wrong.  When was the last time you ran your own "My Profile" page through W3C (or Tidy or whatever) validation?  If your answer is "3 minutes after I read your post", then I apologize.  What did you find in your own validation of this page?  Maybe we can track down the problems.

Thanks.


donnoman

I saw your post on the search page and YES it has problems, I haven't had a chance to look at it other than to confirm it.

Lets relegate the search page discussion to that post and talk about the "general" issues here.

FYI donovanbray.com probably isn't the best test subject. It is not running the latest CVS and its also heavily modified with plugins.

In any cast this is my home page even as it sits now.  http://validator.w3.org/check?uri=http%3A%2F%2Fdonovanbray.com%2F

Ok, the my-profile page has confirmed validation issues. Fixes committed profile.php $Revision: 1.43 $




Joachim Müller

Suggestion to devs:
Afaik the <form> tag is nested in some places where it isn't meant to be in for a particular reason: in some browsers, the form tag results in some space being added. This can be covered with the introduction of another css class (suggested name "nomargin") into all themes:.nomargin {
  margin:0px;
  padding:0px;
}
and by adding class="nomargin" to all <form> tags. However, all core files that have a <form> tag would have to be reviewed for improper nesting.

Joachim

P.S. @kaptainkory: don't get disappointed when dev team members argue about the fixes you suggest. Your test reports are very good. I just wanted to thank you for your contribution (I changed your status to "Tester" btw.)

kaptainkory

QuoteI just wanted to thank you for your contribution (I changed your status to "Tester" btw.)

Muchas gracias.

Quote@kaptainkory: don't get disappointed when dev team members argue about the fixes you suggest.

Yeah, I'm trying not to be difficult; just trying to help.  It isn't lost on me the difficulties a project like this entails and you guys are doing a good job.  I do, however, think it's against the interest of the project to dismiss suspected bugs without any kind of investigation whatsoever; it's this that I get "disappointed" about.  A dev. could have run "My Profile" through HTML validation to confirm the reported bugs here in less time than it took to post a reply implying the problem lies elsewhere.  (...and I'm only using this as an example to illustrate what seems to be a prevailing attitude: that user-reported "bugs" only exist because of out-of-date builds and/or that the problem lies with user supported themes.)

CVS from this morning.  Classic Theme.

"My Profile"...Yes, misplaced <form> tags are still a problem, too, but beyond that there are <input> tag problems that can be fixed in the following way:

In profile.php, FIND (line 114):

            <input type="text" style="width: 100%" name="{$element[1]}" maxlength="{$element[3]}" value="$value" class="textinput">

REPLACE WITH:

            <input type="text" style="width: 100%" name="{$element[1]}" maxlength="{$element[3]}" value="$value" class="textinput" />


FIND (line 131):

                <textarea name="{$element[1]}" ROWS="7" WRAP="virtual"  class="textinput" STYLE="WIDTH: 100%">$value</textarea>

REPLACE WITH:

                <textarea name="{$element[1]}" rows="7" wrap="virtual" class="textinput" style="width: 100%">$value</textarea>


FIND (line 146):

            <input type="password" style="width: 100%" name="{$element[1]}" maxlength="{$element[3]}" value="" class="textinput">

REPLACE WITH:

            <input type="password" style="width: 100%" name="{$element[1]}" maxlength="{$element[3]}" value="" class="textinput" />


FIND (line 305):

            <input type="submit" name="change_profile" value="{$lang_register_php['apply_modif']}" class="button">

REPLACE WITH:

            <input type="submit" name="change_profile" value="{$lang_register_php['apply_modif']}" class="button" />


FIND (line 307):

            <input type="submit" name="change_pass" value="{$lang_register_php['change_pass']}" class="button">

REPLACE WITH:

            <input type="submit" name="change_pass" value="{$lang_register_php['change_pass']}" class="button" />


FIND (line 337):

            <input type="submit" name="change_password" value="$title" class="button">

REPLACE WITH:

            <input type="submit" name="change_password" value="$title" class="button" />


When line 114 outputs for email at least, the maxlength value is left empty:

            <input type="text" style="width: 100%" name="email" maxlength="" value="yadda@yadda.com" class="textinput">

It's probably for someone else to backtrack where {$element[3]} comes from.


Now, shall I continue with my HTML audit and post a screen capture of the validation problems with the "Upload file" page?

Thanks.

kaptainkory

Quote(I changed your status to "Tester" btw.)

Off topic...since my status changed, the icon to post new threads to this forum has disappeared.  (So, now, I can just reply to existing threads but not start new ones.)

Thanks.

donnoman

Profile.php committed   $Revision: 1.44 $


I'm looking at Upload.php why don't you move onto one of the others and audit it.

Upload.php is probably going to take me more time tomarrow to go through, I have the warnings down to dull roar, but I have to test all the changes I've made before I commit, and I don't have enough time to test them tonite.

Joachim Müller

Quote from: kaptainkory on August 03, 2005, 01:59:31 AM
Off topic...since my status changed, the icon to post new threads to this forum has disappeared.  (So, now, I can just reply to existing threads but not start new ones.)
I'm sorry, this was of course not intentional. Fixed the permissions for the "Tester" group, please report back if you still can't start new threads.

Joachim

Joachim Müller


Joachim Müller