Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Viewing some HTML sources produces output with warnings and errors  (Read 5715 times)

0 Members and 1 Guest are viewing this topic.

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51

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).
« Last Edit: September 06, 2005, 11:27:11 am by GauGau »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #1 on: August 02, 2005, 04:51:40 am »

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.
Logged

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #2 on: August 02, 2005, 06:02:25 am »

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.

Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #3 on: August 02, 2005, 08:23:57 am »

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 $



Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #4 on: August 02, 2005, 09:28:48 am »

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:
Code: [Select]
.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.)
Logged

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #5 on: August 02, 2005, 03:51:34 pm »

Quote
I 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):

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

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

FIND (line 131):

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

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

FIND (line 146):

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

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

FIND (line 305):

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

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

FIND (line 307):

Code: [Select]
            <input type="submit" name="change_pass" value="{$lang_register_php['change_pass']}" class="button">
REPLACE WITH:

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

FIND (line 337):

Code: [Select]
            <input type="submit" name="change_password" value="$title" class="button">
REPLACE WITH:

Code: [Select]
            <input type="submit" name="change_password" value="$title" class="button" />

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

Code: [Select]
            <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.
Logged

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #6 on: August 03, 2005, 01:59:31 am »

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.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #7 on: August 03, 2005, 07:14:22 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #8 on: August 03, 2005, 07:52:41 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #9 on: August 09, 2005, 09:05:34 am »

can this thread be marked as "fixed"?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Viewing some HTML sources produces output with warnings and errors
« Reply #10 on: September 06, 2005, 11:26:57 am »

as silence means approval, I'll mark this thread as "Fixed"
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.