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

Rad Treeview Object expected!

9 Answers 168 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Joakim
Top achievements
Rank 1
Joakim asked on 06 May 2009, 04:58 PM

Hi!

 

I´ve been fighting with this for a long time and hope someone can help me.

 

I have a RadTreeview as a usercontrol. The control is placed inside a pagelayout.  Everything work great on my local computer. When I put the dll on live server I end up with a javascript error: Object excepted, when trying to use the control (hoover,clicking,checking whatever!).
When debugging it I received this (in ScriptResource.axd):


this._properties.setValue("hoveredCssClass",_54,true);

},get_childListElement:function(){

if(!this._nodeListElement){

this._nodeListElement=$(this.get_element()).children("ul").get(0)||null;

}

return this._nodeListElement;

},get_contentElement:function(){

if(!this._contentElement){

this._contentElement=$(this.get_element()).children("div").get(0)||null; ß Here it stops.

}

return this._contentElement;

},get_contextMenuID:function(){

 

The thing is that it works when pagelayout is in another .master-file except the default one?
I´ve managed to recreate the problem locally but could fix it by adding following lines to web.config (the Fiddler-program was telling me ScriptResources couldn´t be loaded):

<add verb="GET,HEAD" path="ScriptResource.axd"

type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

validate="false"/> 

 

and

 

<add path="Telerik.Web.UI.WebResource.axd" verb="*"

type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.1.318.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

validate="false" /> 

and checkbox “Verify that the file exists” on .adx extension is unchecked(IIS6)
Happy I logged in to the live server and checked the web.conig. The lines where already there!!!!!!

I´ve compared the Telerik dll´s in GAC and they are identicly with my local computer:

      Telerik.Web.Design, Version=2009.1.318.20
      Telerik.Web.UI, Version=2009.1.318.20

      Telerik.Web.UI, Version=2008.3.1314.20    ß RadEditor is using this one.

 

I´ve also tried to create a new RadTreeview control with just 3 nodes and width and height set. Still the same problem, ON THE SERVER, NOT locally on my machine?

My treeview also check´s for scriptmanagers and adds one if needed. On the failing .master file there is already a scriptmanager defined with EnablePartialRendering=true; . Besides errors is instant shown if there missing and i never recieved these so....

So, same set of dll´s and same web.config, master and pagelayout? 

i´ve read every post about "RadTreeview Object exptected" but none of them seems like mine?

Any ideas?

9 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 07 May 2009, 06:53 AM
Hello Joakim,

I suggest you check this blog post which may help you troubleshooting the web resource problem.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joakim
Top achievements
Rank 1
answered on 07 May 2009, 07:40 AM
Tanks for quick replay!

I´ve allready read that one. My problem is not that ScriptResources is unavailable. When the error occurs and JIT-dedub takes me to the posted code above the ScriptResourceFile is allready loaded right. Otherwise there would be nothing to debug..

Any other suggestions?
0
Atanas Korchev
Telerik team
answered on 07 May 2009, 07:55 AM
Hi Joakim,

If it works in a different page maybe you have some broken HTML. You can check for unclosed html tags or improperly nested tags. In any case you can send a live url which we can test.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joakim
Top achievements
Rank 1
answered on 07 May 2009, 09:47 AM
Hi!

Good point! But if its working om my local computer with same set of masterpages and pagelayouts the hml should be the same.

I´ve tested Fiddler a little more and it shown http/401 on every ScriptResource and WebResource Request? Some of the request is followed by http/304 but not all?  I´m starting to suspect the server IIS6.

i´ve tested to delete the Resource handlers from web.config from my local computer. The page i´m testing on contains 3 rad control besides my treeview:
modal popup window, RaddropDown and RadEditor. When deleting the resource (http)handlers i´ve recieved the "Object excepted"-error when trying to open modal popupwindows, the other controls just freezes(of course). That exact what i´m recieving from my treeview when the resourcehandles exists in web.conig on the server. 

maybe i should mention that i had a second test computer with same problem as the server.  RadControlInstance.EnableEmbeddedScript = true solved that problem? Default setting for EnableEmbeddedScript should be true but it had some effect on the test computer, not on server.

Could it be idea to try EnableEmbeddedScripts=false and "manually" reference the js,files?  It does effect the handling of .axd files right?
0
Joakim
Top achievements
Rank 1
answered on 07 May 2009, 10:13 AM

hmm, progress!

if i set the RadEditor Visible="false", or deactive RadEditor feature my treeview control works fine??

any ideas?
0
Atanas Korchev
Telerik team
answered on 07 May 2009, 10:30 AM
Hello Joakim,

Setting EnableEmbeddedSkins/Scripts to false indeed affects embedded resources - they are no longer registered. Receiving 401 errors indicate some autorization issues. You can check the security settings of your web server. You can also try manually requesting the script url from your browser's address bar. The fact that it starts to work when you disable the editor is also trange. I guess some of the editors' scripts are failing. Is there any live url which we can view? If this information is sensitive and you cannot disclose it in the public you could open a support ticket.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joakim
Top achievements
Rank 1
answered on 07 May 2009, 01:16 PM
okey! i think i know what the problem is. RadEditor!

i´ve stripped my pagelaout to only 2 controls, my treeview and rad editor. My treeview only work if its places above the rad editor?

The editor must be doing something that makes the treeview fail?  if i deactive the RadEditor feature and sharepoint standard editor appears i can put my treeview anywhere, it doesn´t matter. it always work???

any suggestions?
0
Atanas Korchev
Telerik team
answered on 07 May 2009, 02:25 PM
Hello Joakim,

Unfortunately there is no known issue which manifests itself in the described manner. Is it possible to either post here the page declaration or open a support ticket? We need to reproduce the exact same case locally so we can troubleshoot.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joakim
Top achievements
Rank 1
answered on 08 May 2009, 07:40 AM
Tanks for the support so far.

Now i know its RadEditor making my treeview crash. I believe the Rad Edtior making it impossible for my control to load its needed Resources because of a miner errror in the editor. The editor is still workning though.

ok. I get back to you with support ticket..

Regards
/Joakim
Tags
TreeView
Asked by
Joakim
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Joakim
Top achievements
Rank 1
Share this question
or