Telerik.Sitefinity.Web.UI.PublicControls.JavaScriptEmbedCont

Posted by Community Admin on 04-Aug-2018 21:15

Telerik.Sitefinity.Web.UI.PublicControls.JavaScriptEmbedControl

All Replies

Posted by Community Admin on 17-Sep-2014 00:00

I have a Sitefinity site that is redirecting to another URL every time a document is not found:
http://mysite.com/lalala.html --> It redirects to: newlocation.mysite.com/lallala.html

I did a grep in the hard drive and found a Windows temporary cs file that had a reference to the javascript that could be the cause. 

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\b5c90cf0\69e2fa94\App_Web_96913ee9-5f2f-42c0-986f-7dddeb5cddf6_31_basic.aspx.d63928b6.uuws8j2x.0.cs 

I am afraid this was embedded in the Sitefinity dll and I cannot find where this javascript is.

I pasted part of the code,  can someone point to me where in the Sitefinity website I can go to change this script, or anywhere I could find this at all?

Thanks.

 

    [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
    public class sfpageservice_96913ee9_5f2f_42c0_986f_7dddeb5cddf6_31_basic_aspx : global::System.Web.UI.Page, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler
        
        
        #line 15 "server/.../96913EE9-5F2F-42C0-986F-7DDDEB5CDDF6_31_Basic.aspx"
        protected global::Telerik.Sitefinity.Web.UI.PublicControls.JavaScriptEmbedControl C002;
        
        #line default
        #line hidden
        
        
        #line 15 "server/.../96913EE9-5F2F-42C0-986F-7DDDEB5CDDF6_31_Basic.aspx"
        protected global::Telerik.Sitefinity.Web.UI.SitefinityPlaceHolder Body;
        
        #line default
        #line hidden
        
        
        #line 14 "server/.../96913EE9-5F2F-42C0-986F-7DDDEB5CDDF6_31_Basic.aspx"
        protected global::System.Web.UI.HtmlControls.HtmlGenericControl PublicWrapper;
        
        #line default
        #line hidden
        
        
        #line 12 "server/.../96913EE9-5F2F-42C0-986F-7DDDEB5CDDF6_31_Basic.aspx"
        protected global::System.Web.UI.HtmlControls.HtmlForm aspnetForm;

 

 

 .....

 

 

 

         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::Telerik.Sitefinity.Web.UI.PublicControls.JavaScriptEmbedControl @__BuildControlC002()
            global::Telerik.Sitefinity.Web.UI.PublicControls.JavaScriptEmbedControl @__ctrl;
            
            #line 15 "server/.../96913EE9-5F2F-42C0-986F-7DDDEB5CDDF6_31_Basic.aspx"
            @__ctrl = new global::Telerik.Sitefinity.Web.UI.PublicControls.JavaScriptEmbedControl();
            
            #line default
            #line hidden
            this.C002 = @__ctrl;
            @__ctrl.ApplyStyleSheetSkin(this);
            
            #line 15 "server/.../96913EE9-5F2F-42C0-986F-7DDDEB5CDDF6_31_Basic.aspx"
            @__ctrl.CustomJavaScriptCode = @"function redirect()

  
  var httpURL= ""newlocation.mysite.com"" + window.location.pathname + window.location.search;
    var errorIndex =  window.location.search.indexOf(""?aspxerrorpath="")
    if(errorIndex >= 0)
                httpURL =  ""newlocation.mysite.com""  +  window.location.search.substring(window.location.search.substring(errorIndex).indexOf(""="") + 1);                       
    if((window.location.pathname.indexOf(""Action/Edit"") == -1) ||  confirm(""redirecting to "" + httpURL))
                window.location = httpURL;
    else if(window.location.pathname.indexOf(""Action/Edit"") == -1)
                window.location = window.location.hostname + ""/404NotFound"";

redirect();

";
            
            #line default
            #line hidden
            
            #line 15 "server/.../96913EE9-5F2F-42C0-986F-7DDDEB5CDDF6_31_Basic.aspx"
            @__ctrl.ID = "C002";
            
            #line default
            #line hidden
            return @__ctrl;
       


        
 



 

Posted by Community Admin on 18-Sep-2014 00:00

I found out the page title (it was embedded in the cs code), and then was able to find the page with the embedded Javascript. Case solved.

This thread is closed