Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: johnpaul2k2 on October 17, 2012, 08:31:48 AM

Title: how to minimise this errors and warnings??
Post by: johnpaul2k2 on October 17, 2012, 08:31:48 AM
(https://lh3.googleusercontent.com/-DDy8RJh2pIw/UH6bS9fJlrI/AAAAAAAAAOM/a6jeuU_dhus/s989/Capture.PNG)

I got this results from http://validator.w3.org/check?uri=topnichez.com ( my forum result).
i think i am really trying to know SMF and how to solve it's problem.
what will i do to minimize this problems. we are too much!
Title: Re: how to minimise this errors and warnings??
Post by: MrPhil on October 17, 2012, 09:09:00 AM
That's a lot more errors than this SMF community forum gets. Ideally, it should pass W3C validation clean as a whistle (hint, hint, guys!), as it is (nearly) vanilla SMF. You seem to have a lot of mods and/or custom work installed -- could they be the source of most of your errors and warnings? Is it a default theme?

Problems with a page's structure could certainly affect SEO and overall performance, so it's always a good idea to clean up as much as possible (as well as being a point of pride for the owner). In your case, though, I suspect much of it is coming from non-standard SMF code. You might try disabling all your mods and seeing how much things improve, and then re-enabling them one-by-one, seeing where errors come in.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on October 17, 2012, 09:24:44 AM
 :o all the mod? that may cause more harm than good. i have some things running on my forum with all these including simple portal. yes i did some manual editing like expanding the width of my theme, adding facebook hook, adsense first post advert and co. how will i clean them up. cos i think it is affecting my performances............ any other alternative apart from uninstalling all the mod??

what if i change theme?
Title: Re: how to minimise this errors and warnings??
Post by: MovedGoalPosts on October 17, 2012, 09:34:54 AM
If you drill down further into that validation screen it will start to tell you what the individual errors are.  In many cases it will be simple syntax at fault.  Often this is going to be incorrect coding errors you have introduced in some of your blocks.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on October 17, 2012, 09:49:22 AM
all i try to do is uninstall any "not useful" mod(s) on my forum. in terms of block , i can't really tell bcos i am still new here (4 months old) .
should i try changing the theme?
Title: Re: how to minimise this errors and warnings??
Post by: Matthew K. on October 17, 2012, 10:44:49 AM
Just so you know, XHTML validation errors will not affect site performance directly.
Title: Re: how to minimise this errors and warnings??
Post by: MovedGoalPosts on October 17, 2012, 11:53:41 AM
I very much doubt it is just your theme causing the validation issues.  A lot of things may relate to the code of insertions linking to other sites and buttons that you have pasted into various blocks and elements on your page.  Often code generated by other sites, for links and things to buttons, will load up slowly and affect performance if the other site is heavily loaded, and may also be written with certain coding and display standards in mind, for example HTML is not the same as XHTML transitional.  Many browsers can compensate for these errors, even if the validation is incorrect, but especially if you are trying to troubleshoot why something doesn't display as expected a validated page will help debugging.

I know that with my own website I had a number of problems due to code within blocks, often my own fault, but sometimes because I'd used a custom html rather than custom php block in Simpleportal, or pasted code from the likes of paypal for donate button links and other weirdness.  It was a case of looking at each validation error in turn, and if necessary getting out google to track down an alternative.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on October 17, 2012, 01:08:03 PM
lemme add another theme and check the level of errors and warnings............
Title: Re: how to minimise this errors and warnings??
Post by: stylusss on October 19, 2012, 04:14:23 PM
My forum has many errors to, but it runs properly. Any reason why we should keep these errors low?
Title: Re: how to minimise this errors and warnings??
Post by: MrPhil on October 19, 2012, 09:22:34 PM
Depending on the specific error, a search engine may not be able to read the text in a certain part of the page. That could have a negative impact on your search results. If it's an important keyword that's missed, that could potentially be costly to you.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on November 14, 2012, 02:25:22 AM
i have removed all the unnecessary blocks on my forum but i there no other way to minimize this?? like a mod to clean them up?
Title: Re: how to minimise this errors and warnings??
Post by: MrPhil on November 14, 2012, 08:51:23 AM
I take it you asked the validator for "verbose output" and "show source", so you can see the details on all the errors? Once you see the errors (serious stuff, not "image tag is missing an alt attribute") you should be able to figure out where (PHP) they're coming from and correct them.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on November 14, 2012, 10:42:42 AM
THANKS ALOT
i was enable to minimize it to 60 errors but majority of other "errors" are indicating "<" or ">" or "="

some are <meta> , <head>   lol

it's impossible to remove all these tag or what should i do on this case??
Title: Re: how to minimise this errors and warnings??
Post by: Matthew K. on November 14, 2012, 11:34:26 AM
It's possible to fix the errors, for sure. But it'll take time.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on November 14, 2012, 11:40:12 AM
Quote from: Labradoodle-360 on November 14, 2012, 11:34:26 AM
It's possible to fix the errors, for sure. But it'll take time.
my friend, maybe you didn't understand what i mean

some of the signs are "<" or ">" or "=" 

and some of them indicated  </head>  where "<" is what i should removed??

should i proceed??? by removing them ??

will it affect my coding???

Title: Re: how to minimise this errors and warnings??
Post by: Matthew K. on November 14, 2012, 01:08:57 PM
No, I didn't misunderstand what you meant. It means that there are XHTML issues most likely before those tags close.

To be of much more help, I'd just have to do it myself.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on November 14, 2012, 03:25:55 PM
should i inbxo you my cpanel details or what will i do so you can help me
Title: Re: how to minimise this errors and warnings??
Post by: MrPhil on November 14, 2012, 03:39:46 PM
You don't want to go wildly deleting tags that it has flagged. You need to understand what it is complaining about, and then the flagged tag may be perfectly good. The actual problem may lie "upstream" in another (hopefully flagged) error. YOU have to understand what proper HTML is, and figure which of the reported errors are legitimate.

The W3C validator seems to suffer from poor "error recovery" (in compiler terms). I remember 20 to 25 years ago, C compilers would get lost at the first error, and produce a cascade of bogus errors until they hit some predefined limit. Compiler theory has advanced considerably since then, allowing some degree of recovery from legitimate errors so that there are rarely cascades. Maybe some day the W3C will apply some recent compiler design theory to their validator.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on November 14, 2012, 04:00:58 PM
Quote from: MrPhil on November 14, 2012, 03:39:46 PM
You don't want to go wildly deleting tags that it has flagged. You need to understand what it is complaining about, and then the flagged tag may be perfectly good. The actual problem may lie "upstream" in another (hopefully flagged) error. YOU have to understand what proper HTML is, and figure which of the reported errors are legitimate.

The W3C validator seems to suffer from poor "error recovery" (in compiler terms). I remember 20 to 25 years ago, C compilers would get lost at the first error, and produce a cascade of bogus errors until they hit some predefined limit. Compiler theory has advanced considerably since then, allowing some degree of recovery from legitimate errors so that there are rarely cascades. Maybe some day the W3C will apply some recent compiler design theory to their validator.
thanks Mrphil

lemme wait for Mr Labradoodle-360 to help me out. you guys are awesome
Title: Re: how to minimise this errors and warnings??
Post by: Matthew K. on November 14, 2012, 05:46:27 PM
Unfortunately, I do not have the time to do it for you. I said I can't help you too much more without just doing it myself, but that doesn't insinuate that I can or will.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on November 15, 2012, 12:08:38 AM
Quote from: Labradoodle-360 on November 14, 2012, 05:46:27 PM
Unfortunately, I do not have the time to do it for you. I said I can't help you too much more without just doing it myself, but that doesn't insinuate that I can or will.
No problem
Quote from: MrPhil on November 14, 2012, 03:39:46 PM
You don't want to go wildly deleting tags that it has flagged. You need to understand what it is complaining about, and then the flagged tag may be perfectly good. The actual problem may lie "upstream" in another (hopefully flagged) error. YOU have to understand what proper HTML is, and figure which of the reported errors are legitimate.

The W3C validator seems to suffer from poor "error recovery" (in compiler terms). I remember 20 to 25 years ago, C compilers would get lost at the first error, and produce a cascade of bogus errors until they hit some predefined limit. Compiler theory has advanced considerably since then, allowing some degree of recovery from legitimate errors so that there are rarely cascades. Maybe some day the W3C will apply some recent compiler design theory to their validator.
please can you help me out MrPhil? maybe i will send you the details please
Title: Re: how to minimise this errors and warnings??
Post by: MrPhil on November 15, 2012, 09:34:03 AM
Sorry, I don't have the time available to take the list of errors and trace it back to your particular PHP code changes. Hint: usually the first error in a list is a "real" error, so fix that and validate again. You need to have a decent understanding of HTML to see what the validator is complaining about -- sometimes the problem can be very subtle. Don't worry about errors like "missing alt attribute" -- you can live without fixing those, or at least, hold off until later. You want to fix things like unrecognized tags first. Things like unclosed tags should then be dealt with (e.g., your doctype model is XHTML and you have a tag <img .....> you want to change it to <img ..... />).
Title: Re: how to minimise this errors and warnings??
Post by: Matthew K. on November 15, 2012, 09:38:53 AM
Also...please don't PM me asking for help. I already told you that I do not have the time.
Title: Re: how to minimise this errors and warnings??
Post by: johnpaul2k2 on November 15, 2012, 10:15:57 AM
Quote from: Labradoodle-360 on November 15, 2012, 09:38:53 AM
Also...please don't PM me asking for help. I already told you that I do not have the time.
sorry about that,
Quote from: MrPhil on November 15, 2012, 09:34:03 AM
Sorry, I don't have the time available to take the list of errors and trace it back to your particular PHP code changes. Hint: usually the first error in a list is a "real" error, so fix that and validate again. You need to have a decent understanding of HTML to see what the validator is complaining about -- sometimes the problem can be very subtle. Don't worry about errors like "missing alt attribute" -- you can live without fixing those, or at least, hold off until later. You want to fix things like unrecognized tags first. Things like unclosed tags should then be dealt with (e.g., your doctype model is XHTML and you have a tag <img .....> you want to change it to <img ..... />).
thanks alot. i will do as you said