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

An invalid or illegal string was specified - how to understand where is the problem?

5 Answers 1863 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Igor
Top achievements
Rank 1
Igor asked on 14 Oct 2013, 10:54 AM
I see in FireBug the error: 

'SyntaxError: An invalid or illegal string was specified', 'http://localhost:63188/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2013.2.717.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ahe-IL%3a0507d587-20ad-4e22-b866-76bd3eaee2df%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a1e771326%3a4cacbc31%3a2003d0b8%3ae524c98b%3ae330518b%3ac8618e41%3ae4f8f289%3a11a04f7e%3a6b3f73b3%3a92fe8ea0%3afa31b949%3a874f8ea2%3a19620875%3a490a9d4e%3abd8f85e4%3a8e6f0d33%3a6a6d718d%3aa7e79140%3aaa288e2d%3ac172ae1e%3a9cdfc6e7', '1415'

My question how it is possible to understand where is the problem?

5 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 17 Oct 2013, 08:16 AM
Hello,

 This is normally caused when there's a parser error in the client-side scripts that the RadScriptManager is trying to combine together. You can try the latest version of the controls which contains the most up to date fixes and improvements to ensure all RadCotnrols related scripts can be seamlessly combined together. Additionally you can check whether you use any custom client-side code and whether it is correctly formatted and error free. Finally you can also check out how this works with the Standard ASP.NET script manager on the page to see if it provides more information on the error. 

Regards,
Marin
Telerik
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 the blog feed now.
0
Igor
Top achievements
Rank 1
answered on 28 Oct 2013, 09:43 AM
Updated to the last version. Didn't help.
What can be my next steps to find the problem?
0
Marin
Telerik team
answered on 30 Oct 2013, 11:08 AM
Hi,

 The exception indicates that there's a syntax error when the script manager is combining the different scripts into one common. You can carefully check whether you have any custom client-side scripts or settings in the controls that require loading of additional scripts that are not properly formatted and can cause parser error when the script manager is combining them. Additionally you can also try using a different script manager e.g. ASP.NET default ScriptManager control or the Telerik RadScriptManager control. But most importantly double check any client-side scripts that are loading on the page for any syntax or parser errors to narrow down the cause of the problem. You can also try a more simplified version of the page containing as few script controls as possible to easily identify the cause of the problem. Then you can gradually start to add more of the original script controls to see which one exactly is causing the issue.

Regards,
Marin
Telerik
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 the blog feed now.
0
Bruce
Top achievements
Rank 1
answered on 26 Nov 2013, 06:55 PM
Hello Marin,
I have also run into this same issue that many others have reported. I'm also running the latest version of the ASP.NET AJAX controls. I have pinpointed the issue to this block of commented out css:

/*#form1 .RadCalendar .rcRow td[previousmonth="true"] { height:0px; line-height:0px;}*/
 
        /*#form1 .RadCalendar .rcOutOfRange span { color:lightgray;}*/
 
        /*#form1 .RadCalendar .rcOtherMonth a,
        #form1 .RadCalendar .rcRow td[previousmonth="true"] span,
        #form1 .RadCalendar .rcRow td[previousmonth="true"] a { display:none; height:0px;}*/

The css is not in a stylesheet (don't know if that matters). It's within a style tag in the header. In my project, all I have to do to replicate this issue is load the page and click a tab on my ajaxified RadTabStrip. The RadTabStrip is set to update a RadGrid and itself using a RadAjaxManager in this fashion:

<telerik:RadAjaxManager ID = "ram1" runat = "server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID = "rtsAppointmentStatus">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID = "rgAppointments" />
                        <telerik:AjaxUpdatedControl ControlID = "rtsAppointmentStatus" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
</AjaxSettings>
        </telerik:RadAjaxManager>

But you and I both mentioned, the issue appears to be in the parsing of commented out CSS. If I delete the commented CSS, the error goes away. I hope you guys can resolve this so I don't have to remember not to leave comments in my CSS.
0
Marin
Telerik team
answered on 29 Nov 2013, 03:34 PM
Hello,

This happens because during an ajax request the content of the head tag is also updated and returned in the request response which the browser is trying to parse but fails.
To avoid the problem you can set the EnablePageHeadUpdate property of the RadAjaxManager to false. 

Kind Regards,
Marin
Telerik
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 the blog feed now.
Tags
Ajax
Asked by
Igor
Top achievements
Rank 1
Answers by
Marin
Telerik team
Igor
Top achievements
Rank 1
Bruce
Top achievements
Rank 1
Share this question
or