Pages not validating
Permalink
My website pages are no longer validating after updating to 5.3.3. If I look at the source code, I see the following generated chunk of code:
<div id="" class="ccm-block-styles" >
When I validate the page, I get the following error:
Line 133, Column 17: syntax of attribute value does not conform to declared value
<div id="" class="ccm-block-styles" >
The value of an attribute contained something that is not allowed by the specified syntax for that type of attribute. For instance, the “selected” attribute must be either minimized as “selected” or spelled out in full as “selected="selected"”; the variant “selected=""” is not allowed.
Any idea how I can fix this? I really care about creating valid HTML/CSS sites.
<div id="" class="ccm-block-styles" >
When I validate the page, I get the following error:
Line 133, Column 17: syntax of attribute value does not conform to declared value
<div id="" class="ccm-block-styles" >
The value of an attribute contained something that is not allowed by the specified syntax for that type of attribute. For instance, the “selected” attribute must be either minimized as “selected” or spelled out in full as “selected="selected"”; the variant “selected=""” is not allowed.
Any idea how I can fix this? I really care about creating valid HTML/CSS sites.
My site was validating just fine until I updated to 5.3.3. I really hope that someone can come up with a fix for this.
It appears to be the empty id attribute that's causing the problem ('id=""'). It looks like it would be easy to fix, but I also seriously doubt that it would cause any rendering issues. But I'm with you -- I want all my pages to validate!
I found that as well. The W3C Validator is highlighting several of the id=" issues but when you look in the source code via the rendered page in firefox (or others) it appears correctly as id="" near as I can see.
I may be wrong but could anyone else confirm that?
I may be wrong but could anyone else confirm that?
id="" is not valid markup as far as the W3C validator is concerned. This won't validate:
because of the empty id attribute.
The validator highlights the 2nd double-quote mark because that's where the error was found. (It expected a different character.)
Just added this to the Bug Tracker, by the way.
<h1 id="">Test</h1>
because of the empty id attribute.
The validator highlights the 2nd double-quote mark because that's where the error was found. (It expected a different character.)
Just added this to the Bug Tracker, by the way.
I know that the double-quote for the id is the reason the document won't validate the problem is that C5 inserts that code automatically and I don't have a way to modify that. The prob;em needs to be fixed in the source code for C5.
Yup. That's why I opened an item in the Bug Tracker for this. Feel free to vote and add your $.02:http://is.gd/40uij
Will every web page validate with no errors.......NO!!
Will every web page render the same in all browsers......NO!!!!
Until every web browser developer use's the same format you will have to hack your way the best you can to be compliant.
What this means is DONT SWEAT THE LITTLE STUFF do the best you can and move on the next job. Time is money, you can burn up all your profits trying to validate every line of code.
If you validate free and clear GREAT! if not dont worry, not even the W3C is God when it comes to web browser formats.
Accessibility should carry a little more weight then Validity. Just dont sweat it.
Will every web page render the same in all browsers......NO!!!!
Until every web browser developer use's the same format you will have to hack your way the best you can to be compliant.
What this means is DONT SWEAT THE LITTLE STUFF do the best you can and move on the next job. Time is money, you can burn up all your profits trying to validate every line of code.
If you validate free and clear GREAT! if not dont worry, not even the W3C is God when it comes to web browser formats.
Accessibility should carry a little more weight then Validity. Just dont sweat it.
You're right of course, but this IS a bug. Albeit a low-priority one.
One of the reasons I like Concrete5 is that it doesn't screw with my markup too much. If somebody wants to be a stickler about generating valid markup, they should be able to do so with C5 or any other CMS that claims to be standards-compliant.
One of the reasons I like Concrete5 is that it doesn't screw with my markup too much. If somebody wants to be a stickler about generating valid markup, they should be able to do so with C5 or any other CMS that claims to be standards-compliant.
whelp I think you hit it on the head - it's not desired but its not fatal. Probably going to be some time before we get a chance to look at this..
if someone from our community wanted to submit a PATCH fix as described in the beta section, we'd be happy to review/include it in the next version of concrete5.
thx
-frz
if someone from our community wanted to submit a PATCH fix as described in the beta section, we'd be happy to review/include it in the next version of concrete5.
thx
-frz
I have a working fix. Do I need to be a member of the Beta Team to submit a patch?
The offending file is:
concrete/elements/block_header_view.php
My fix simply supresses the output of 'id=""' if $blockStyles->getCssID(1) returns null.
Of course there could be a deeper underlying problem that's causing this -- I didn't dig that far.
The offending file is:
concrete/elements/block_header_view.php
My fix simply supresses the output of 'id=""' if $blockStyles->getCssID(1) returns null.
Of course there could be a deeper underlying problem that's causing this -- I didn't dig that far.
Thank you ddrace for working on a fix for this problem. I am curious to hear from the C5 team if this fix interferes with any of the C5 functionality or if it is completely safe to do this patch.
Thanks again,
Thanks again,
Dont get me wrong you should do your best to validate,But your not always going to, and its ok.And if C5 does have an issue it should be fixed.
I guess what I am trying to say is don't get so fixated with validation that it drives you nuts.
You can still build a website with tables and still have it validate!
With all the legal issues of usability and accessibility coming to light one ( can a blind person use a screen reader on your site?,can a person who sets his preference to no graphics still know what your sites about?)Whats more important!
Follow this link it will show you what top designers are thing today.....
http://www.slideshare.net/elliotjaystocks/stop-worrying-get-on-with...
I guess what I am trying to say is don't get so fixated with validation that it drives you nuts.
You can still build a website with tables and still have it validate!
With all the legal issues of usability and accessibility coming to light one ( can a blind person use a screen reader on your site?,can a person who sets his preference to no graphics still know what your sites about?)Whats more important!
Follow this link it will show you what top designers are thing today.....
http://www.slideshare.net/elliotjaystocks/stop-worrying-get-on-with...
The entire <div> shouldn't even print if the design hasn't been customized for that block. The ID attribute is blank because this block doesn't have a design database record yet. I'm making it so that it won't even show up unless you've customized that block's design, and if you have, it should always have an id, whether that be an automatically created on or your own custom one.
I figured there might be a deeper issue going on. My fix works fine, but it's a kludge.
that would have worked too, but i thought it was a good idea to not print those block style divs at all unless they're explicitly needed.
I am a little bit confused. What is the solution for this? I did what ddrace recommended but it didn't work for me. Maybe I am missing something. Is there a patch file I can download or something?
Thanks you
Thanks you
we are working on releasing 5.3.3.1 which will include this and many other bug fixes.
Here's my patched file. I've been using it on a site I'm working on, and it seems to work fine.
If you want to try it, make sure to backup the file it replaces first, just in case! The file goes in /concrete/elements. (Remove .txt from the extension -- I had to add that in order to post it here.)
Sounds like 5.3.3.1 will be here soon though, and it will fix the issue.
If you want to try it, make sure to backup the file it replaces first, just in case! The file goes in /concrete/elements. (Remove .txt from the extension -- I had to add that in order to post it here.)
Sounds like 5.3.3.1 will be here soon though, and it will fix the issue.
When i validate a complete new installation of C5 i get this. ist that normal?
And on the other page i get 38 Errors!?. O_o
I didn't changed anything until now, I'm new to C5 and wanted to test it as analternative, but with 38Errors out of the Box, i'm not sure if I want to work with that!? O_o
Validation Output: 9 Errors
And on the other page i get 38 Errors!?. O_o
I didn't changed anything until now, I'm new to C5 and wanted to test it as analternative, but with 38Errors out of the Box, i'm not sure if I want to work with that!? O_o
Validation Output: 9 Errors
Line 31, Column 7: required attribute "type" not specified <style> ✉ The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. Line 58, Column 7: required attribute "type" not specified <style> ✉ The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. Line 58, Column 7: document type does not allow element "style" here <style> ✉ The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
Viewing 15 lines of 71 lines. View entire code block.
I am also very serious about keeping standards compliant and will be watching this post with baited breath.