1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to fix W3C errors?

Discussion in 'Programming' started by Sharebeast, Jan 31, 2016.

  1. #1
    Well, i have over 100 of them.
    Let's start with | general entity "c.getContext" not defined and no default entity |
    How should i proceed? I searched from google, but didn't find any answers...

    Thank You!
     
    Sharebeast, Jan 31, 2016 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #2
    You need to find where in your code you have "c.getContext", work out what it's looking for and fix it.

    There are no shortcuts, it's your site, work through the errors and get them sorted. You may not want to do all of them, but some will be easily fixed.
     
    sarahk, Jan 31, 2016 IP
    deathshadow likes this.
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    What exactly do you mean by a "W3C error" as that's INCREDIBLY vague... do you mean the HTML validation service? CSS validation service?

    The thing you mention is typically a JavaScript error which has dick all to do with W3C validation -- typically getContext is used with the CANVAS element, typically when it fails it means you're in a browser that doesn't SUPPORT canvas (basically anything IE8/earlier), and well written scripts should recognize that and either provide a fallback, or warn the user about reduced functionality.

    WHAT SITE is reporting these "errors"? What are you using to find and/or what specific tool is reporting these "errors"?

    You basically have four "sentence" post that doesn't even manage two complete thoughts with no examples of the code in question and no mention of how you even found out you have "errors" in the first place, mentioning the W3C on something that's unrelated to any tools they offer for error checking...

    We're not mind readers...
     
    deathshadow, Feb 1, 2016 IP
    sarahk likes this.
  4. Kristin Perry

    Kristin Perry Greenhorn

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    For fixing W3C error you should install a minification plugin and manually include the CSS in your theme as well.
     
    Kristin Perry, Feb 1, 2016 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #5
    ROFL, what the hell will minification do?
    We don't even know if his site can use plugins
     
    sarahk, Feb 1, 2016 IP
    malky66 and deathshadow like this.
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #6
    Glad you said it before I did... I was on the verge of posting a rather colourful string of insulting language directed at said poster.
     
    deathshadow, Feb 2, 2016 IP
    sarahk likes this.
  7. Sharebeast

    Sharebeast Banned

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #7
    about 30% of the errors are caused by this piece of code:
            <script type="text/javascript">
                window._wpemojiSettings = {"baseUrl":"http:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/sitename\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.4"}};
                !function(a,b,c){function d(a){var c=b.createElement("canvas"),d=c.getContext&&c.getContext("2d");return d&&d.fillText?(d.textBaseline="top",d.font="600 32px Arial","flag"===a?(d.fillText(String.fromCharCode(55356,56806,55356,56826),0,0),c.toDataURL().length>3e3):("simple"===a?d.fillText(String.fromCharCode(55357,56835),0,0):d.fillText(String.fromCharCode(55356,57135),0,0),0!==d.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g;c.supports={simple:d("simple"),flag:d("flag"),unicode8:d("unicode8")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag&&c.supports.unicode8||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
            </script>
    Code (markup):
    It's included in wordpress by default, so how can it be full of errors?
     
    Last edited: Feb 2, 2016
    Sharebeast, Feb 2, 2016 IP
  8. malky66

    malky66 Acclaimed Member

    Messages:
    3,996
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #8
    You answered your own question there..turdpress is one big error.
     
    malky66, Feb 2, 2016 IP
  9. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #9
    He still warrants an answer.

    I'd start by reuploading the file just incase it got messed up somewhere along the way.
    You're on the latest version of WP?
     
    sarahk, Feb 2, 2016 IP
  10. Sharebeast

    Sharebeast Banned

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #10
    I used nibbler.silktide.com to find the errors.

    Yeah, i'm on the latest version of WP.
     
    Sharebeast, Feb 2, 2016 IP
  11. malky66

    malky66 Acclaimed Member

    Messages:
    3,996
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #11
    True, but if he's worried about validation errors he needs to dump wordpress, The markup is invalid by default.
     
    malky66, Feb 2, 2016 IP
  12. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #12
    Bwhahahaha.... bw.... bwhah... bw.... ok, gimme a bwhahahaa... oh man....

    Ok, I admit it, you got me... I cannot figure out if this:
    Was supposed to be meant sarcastically or not. If so, well played. If not... well... I lack the word, I'll have to borrow from someone else.

    Turdpress is universally known for bloated, rubbish, garbage websites. Do you know ANYTHING about HTML? Like, even the simplest of things? If so, take a stock unmodified turdpress installation, and view source of what it has the UNMITIGATED GALL to call markup. It is so ignorantly coded both on the front and back end I still marvel at how anyone is DUMB ENOUGH to use it by choice for anything more than blog for grandma.

    The error in this case is that it appears some ignorant halfwit has put static javascript in the markup, failed to escape it properly... it's those ampersands that are throwing the error, and there are ways to escape the entire script -- but really like most of the bullshit turdpress spews out, that script REALLY has zero business in the HTML in the first place.

    The "fix" without actually fixing the REAL problem is to look for EVERY script tag that has content in the markup, and if it doesn't start with:
    /* <![CDATA[ */

    or end with:
    /* ]]> */

    You could ALSO theoretically just make those scripts be:
    <script><!--

    and

    --></script>

    and it should work... but again none of that scripttardery belongs in the markup, they belong in one of the MANY external scripts... though all of it REEKS of "JS for nothing and your scripts for free". That ain't workin', that's not how you do it.

    But then looking at your site, that's just the tip of the iceberg in terms of problems which is why I'd drag that entire mess 'round back 'o the woodshed with a 12 gauge and put it down like Old Yeller. It's the bleeding edge of 1998 development methodologies, as evidence by halfwit outdated garbage like the <center> tag being in there, endless pointless scripttardery in the markup, absolute URI's, inaccessible design woes I could spend hours picking apart, overstuffed <meta> guaranteed to tank any chance of search ranking, etc, etc...

    Even the first line of code proudly proclaims it. It's "transitional", which quite literally means "in transition from 1997 to 1998 development practices".
     
    deathshadow, Feb 2, 2016 IP
  13. Sharebeast

    Sharebeast Banned

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #13
    What would be best alternate for wordpress?

    I actually had over 60 000 visits every day 6 months back, but i decided to delete the whole blog. Can't comment why.

    Now i'm back at it...

    I know something about html, css, php - but not enough to fix big problems on on my own.

    Going to platform what isn't wordpress is much reasonable to start fixing those problems...

    <meta> datas are necessary. especially description. Most SEO professionals talk about it. You should look here
    Best music blogs with top 1000 alexa rank still use keywords and metas - and if you really are smart, you can only learn from the best by copying them.
     
    Last edited: Feb 2, 2016
    Sharebeast, Feb 2, 2016 IP
  14. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    818
    Best Answers:
    7
    Trophy Points:
    320
    #14
    Learn to code your own pages.

    There are no such things as big problems. All problems are small. So-called big problems are the result of MANY small problems.

    ALL SEO 'professionals' are scam artists. SEO is a MOVING target that can NEVER be accomplished for more than a few SECONDS. SEO scam artists can never ever keep up no matter what rubbish they tell you.
     
    mmerlinn, Apr 9, 2016 IP