This is a migrated thread and some comments may be shown as answers.

Uncaught Error: SYNTAX_ERR: DOM Exception 12

14 Answers 204 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luca Di Leo
Top achievements
Rank 1
Luca Di Leo asked on 24 Mar 2011, 03:40 PM

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?

14 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 30 Mar 2011, 08:51 AM
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

0
A
Top achievements
Rank 1
answered on 21 Nov 2011, 12:54 AM
Is this resolved? I've been getting this error using AjaxManager,in Chrome and Firefox (8.0).
0
Maria Ilieva
Telerik team
answered on 23 Nov 2011, 02:10 PM
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
0
A
Top achievements
Rank 1
answered on 24 Nov 2011, 06:44 PM
That worked. Thanks!
0
Brent
Top achievements
Rank 1
answered on 27 Mar 2012, 01:25 PM
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.
0
Maria Ilieva
Telerik team
answered on 30 Mar 2012, 10:31 AM
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.
0
Rich Coleman
Top achievements
Rank 1
answered on 23 Aug 2012, 09:01 PM
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.
0
Maria Ilieva
Telerik team
answered on 28 Aug 2012, 11:24 AM
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.
0
AJ
Top achievements
Rank 2
answered on 01 Mar 2013, 02:16 PM
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. 
0
Maria Ilieva
Telerik team
answered on 05 Mar 2013, 01:52 PM
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.
0
Ahmed
Top achievements
Rank 1
answered on 10 Nov 2015, 05:49 AM

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; }'

0
Ahmed
Top achievements
Rank 1
answered on 10 Nov 2015, 06:21 AM

Using Telerik.Web.UI version 2015.2.623.45.

kindly update if this bug is address in latest version.

Thank you

0
Marin Bratanov
Telerik team
answered on 10 Nov 2015, 12:42 PM

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
0
Ahmed
Top achievements
Rank 1
answered on 11 Nov 2015, 10:42 AM

Yes it works after removing the commented CSS rule.

Thank you for the support.​

Tags
General Discussions
Asked by
Luca Di Leo
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
A
Top achievements
Rank 1
Brent
Top achievements
Rank 1
Rich Coleman
Top achievements
Rank 1
AJ
Top achievements
Rank 2
Ahmed
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or