Uncaught Error: SYNTAX_ERR: DOM Exception 12

15 posts, 0 answers
  1. Luca Di Leo
    Luca Di Leo avatar
    3 posts
    Member since:
    Sep 2009

    Posted 24 Mar 2011 Link to this post


    I'm using Chrome 11 / Firefox 4 (2010.3.1317.40) and suddenly the ajax updates started working in a strange way.
    Looking at inspector:

    Uncaught Error: SYNTAX_ERR: DOM Exception 12:
    On Telerik.Web.UI.WebResource.axd: 1136

    The line is this one:

    }if(d[b].indexOf("{")!=-1){e.insertRule(d[b]+"}",e.cssRules.length);
    Telerik.Web.UI.WebResource.axd:1136Uncaught Error: SYNTAX_ERR: DOM Exception 12
    After this the page crashes, no refresh / recompile helps in solving this problem. Is this a bug?
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 30 Mar 2011 Link to this post

    Hi Luca,

    We are not aware of such an issue reported with RadAjax. Could you please elaborate a bit more on your application? What controls are you using on the page and what the RadAjax settings are?
    It will be very helpful if you could open a regular support ticket and send us sample runnable application which demonstrates the described problem. Thus we will be able to test it locally and advise you further.



    Maria Ilieva
    the Telerik team

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. A
    A avatar
    3 posts
    Member since:
    Oct 2008

    Posted 20 Nov 2011 Link to this post

    Is this resolved? I've been getting this error using AjaxManager,in Chrome and Firefox (8.0).
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 23 Nov 2011 Link to this post

    Hello Amarbir,

    We discovered that the described issue is actually a limitation in the RadAjax CSS parser mechanism. Currently we discovered that when you have a comment in which  whole css rule is wraped or for example @media rule wrapping another rule in the css code the RadAjaxManager could not parse this and throw the mentioned exception. Currently this is listed as limitation and the only workaround is to set "EnablePageHeadUpdate" property if the RadAjaxManager to "false".

    Kind regards,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  6. A
    A avatar
    3 posts
    Member since:
    Oct 2008

    Posted 24 Nov 2011 Link to this post

    That worked. Thanks!
  7. Brent
    Brent avatar
    14 posts
    Member since:
    Apr 2008

    Posted 27 Mar 2012 Link to this post

    I am experiencing this same issue with Chrome on multiple pages throughout our application.  If I apply the EnablePageHeadUpdate="false" the problem goes away.  I feel uncomfortable about applying the workaround because I am not sure of the implications. Do you have any examples of functionality that might break if you set EnablePageHeadUpdate to false?  I hesitate to apply it to my application site-wide unless I am clear on what to look for that might be broken by applying this workaround.
  8. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 30 Mar 2012 Link to this post

    Hi Brent,

    Setting this property to false will just still updating the head and all its content after ajax request. This means that is new script should be added after ajax you should do it manually through the RadScriptManager or if new styles should be added this will be done manually by the RadStyleSheetManager. However the scenario in which new styles and scripts should be added only after ajax manually is really really rear so setting EnablePageHeadUpdate to "false" will not leave to big changes in your case.



    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. Rich Coleman
    Rich Coleman avatar
    19 posts
    Member since:
    Jan 2008

    Posted 23 Aug 2012 Link to this post

    I too ran across this error and this fixed it for me as well.  Is this a permanent fix?  This post is over a year old so I figured it would have been fixed by now if it was going to be fixed.
  10. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 28 Aug 2012 Link to this post

    Hello Rich,

    As I mentioned in one of my previous posts this issue is a  limitation in the RadAjax CSS parser mechanism which could not be fixed for now as its fixing could cause some breaking changes in the RadAjax functionality.
    Currently the provided workaround is the only possible way for avoiding the problematic beahvior you are facing.
    Excuse us for any inconvenience this limitation may lead.

    Kind regards,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  11. AJ
    AJ avatar
    33 posts
    Member since:
    Jun 2011

    Posted 01 Mar 2013 Link to this post

    Sorry to bring up an old subject, but I too ran across this issue. I found out it was because this was in my header:

    <style type="text/css">
        @media print {
            body * {
                visibility: hidden;
            }
     
            .printable, .printable * {
                visibility: visible;
            }
     
            .printable { /* aligning the printable area */
                position: absolute;
                left: 40px;
                top: 40px;
            }
        }
    </style>

    After moving that code to the footer, the error stopped coming up. 
  12. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 05 Mar 2013 Link to this post

    Hi Andrew,

    As I have mentioned in my previous posts the RadAjaxManager updates the page head and all the css and java script in it. In case the css is placed in the footer of the Page it is expected to not face the issue as the footer is not updated during AjaxRequest.

    Regards,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  13. Ahmed
    Ahmed avatar
    3 posts
    Member since:
    Nov 2015

    Posted 09 Nov 2015 in reply to Maria Ilieva Link to this post

    We are still getting this same issue

    }if(d[b].indexOf("{")!=-1){e.insertRule(d[b]+"}",e.cssRules.length);​

    Is the issue resolved?

     Uncaught SyntaxError: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule ' 

    /* 

    .defaultADFS { display:none; }'

  14. Ahmed
    Ahmed avatar
    3 posts
    Member since:
    Nov 2015

    Posted 10 Nov 2015 in reply to Ahmed Link to this post

    Using Telerik.Web.UI version 2015.2.623.45.

    kindly update if this bug is address in latest version.

    Thank you

  15. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 10 Nov 2015 Link to this post

    Hi Ahmed,

    I am sorry to say that a fix in the Telerik.Web.UI codebase is not available at the time of writing. I can only suggest the ideas already offered here - removing the commented rule or setting EnablePageHeadUpdate to false.

    Regards,

    Marin Bratanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  16. Ahmed
    Ahmed avatar
    3 posts
    Member since:
    Nov 2015

    Posted 11 Nov 2015 in reply to Marin Bratanov Link to this post

    Yes it works after removing the commented CSS rule.

    Thank you for the support.​

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017