PDA

View Full Version : [CLOSED] Alot of errors after last update



Jurke
Oct 28, 2008, 11:20 AM
Hi
My project went nuts after the last update, I got hundreds of errors in my project. For example "ViewPort does not have a definition for Content". It seems that you have changed the <content> to <body>. So I tried a global replace. But then I got errors, for in some places its still called <content>. so how do i solve this? I cant got throu the code manually, its to many places to change.

/Mikael

Vladimir
Oct 28, 2008, 11:41 AM
Hi,

yes, the Content was changed by Body (see http://forums.ext.net/showthread.php?threadid=3059-7-1.aspx)

The problem should easy solved by replacing <Content> to <Body> and </Content> to </Body>

Please, can you say what places still called <content>?

Jurke
Oct 28, 2008, 11:41 AM
Also, AjaxEvent is not working.





<AjaxEvents><Click OnEvent="Test"><EventMask ShowMask="true" Msg="Loading"/></Click></AjaxEvents>

This, code that worked before the update, does no longer work!

Jurke
Oct 28, 2008, 11:43 AM
Sorry, It was the AjaxToolkit that had Content tags. thats why the global replace did not work

/Mikael

Vladimir
Oct 28, 2008, 11:51 AM
Hi Mikael,

Can you post example which shows that AjaxEvent doesn't work? I can't find any issues with AjaxEvent

Thanks

Jurke
Oct 28, 2008, 11:59 AM
Hi

Its a runtime JS error I get "G.conn.send(E||null)".

This simple example does not work, I get the same error for all the AjaxEvents






<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test_Default" %>


<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>








<html xmlns="http://www.w3.org/1999/xhtml">


<head id="Head1" runat="server">


<title></title>


<script runat="server">





protected void Test(object sender, AjaxEventArgs e)


{


Label1.SetText("TEST");


}


</script>


</head>


<body>


<form id="form1" runat="server">


<ext:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug">


</ext:ScriptManager>





<ext:Button ID="Button1" runat="server" Text="Button">


<AjaxEvents><Click OnEvent="Test"><EventMask ShowMask="true" Msg="Loading"/></Click></AjaxEvents>


</ext:Button>


<ext:Label ID="Label1" runat="server"></ext:Label>


</form>


</body>


</html>



/Mikael

Vladimir
Oct 28, 2008, 12:05 PM
Hi Mikael,

I can't reproduce any errors on your example.

Please, ensure that you use last version from SVN and then rebuild project (you can clear cache of browser also)

Please, let me know if it is not help

Jurke
Oct 28, 2008, 12:43 PM
Hi
I noticed that I dont get it for the simple example that I postet to you. But this example below I tested and that does not work. I have not figured out exactly when its happens, but this code does trigger the error for me. please try it! clear the cache does not help by the way. I think this is a real error.

test.aspx





<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test_Default" %>


<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">


<head id="Head1" runat="server">


<title></title>


<script runat="server">





public UserControl LoadControl(string UserControlPath, params object[] constructorParameters)


{


//System.Collections.Generic.List<object> constParamTypes = new System.Collections.Generic.List<object>();


Type[] constParamTypes = new Type[constructorParameters.Length];


for (int i = 0; i < constructorParameters.Length; i++)


{


constParamTypes[i] = (constructorParameters[i].GetType());


}


UserControl ctl = Page.LoadControl(UserControlPath) as UserControl;


// Find the relevant constructor


System.Reflection.ConstructorInfo constructor = ctl.GetType().BaseType.GetConstructor(constParamTy pes);


//And then call the relevant constructor


if (constructor == null)


{


throw new MemberAccessException("The requested constructor was not found on : " + ctl.GetType().BaseType.ToString());


}


else


{


constructor.Invoke(ctl, constructorParameters);


}


// Finally return the fully initialized UC


return ctl;


}





protected override void OnInit(EventArgs e)


{


int iNumberOfControls = 0;





//if (!Ext.IsAjaxRequest) //<<This does not work


//{


//Simulated slow databas call


//System.Threading.Thread.Sleep(4000);


iNumberOfControls = 10;


//--


//}





for (int i = 0; i < iNumberOfControls; i++)


{


UserControl ucTest = new UserControl();


ucTest = LoadControl("TestUControl.ascx", "Param" + i);


ucTest.ID = "ucTest" + (i + 1).ToString();


form1.Controls.Add(ucTest);


}





}


protected void Test(object sender, AjaxEventArgs e)


{


Label1.SetText("TEST");


}


</script>


</head>


<body>


<form id="form1" runat="server">


<ext:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug">


</ext:ScriptManager>





<ext:Button ID="Button1" runat="server" Text="Button">


<AjaxEvents><Click OnEvent="Test"><EventMask ShowMask="true" Msg="Loading"/></Click></AjaxEvents>


</ext:Button>


<ext:Label ID="Label1" runat="server"></ext:Label>


</form>


</body>


</html>




User control code behind





using System;


using System.Collections;


using System.Configuration;


using System.Data;


using System.Linq;


using System.Web;


using System.Web.Security;


using System.Web.UI;


using System.Web.UI.HtmlControls;


using System.Web.UI.WebControls;


using System.Web.UI.WebControls.WebParts;


using System.Xml.Linq;


using Coolite.Ext.Web;





public partial class TestUControl : System.Web.UI.UserControl


{


string strControlText;


protected void Page_Load(object sender, EventArgs e)


{


}


public TestUControl()


{ }





public TestUControl(string strControlTextInput)


{


strControlText = strControlTextInput;


}


protected void Test(object sender, AjaxEventArgs e)


{


test.SetText(strControlText);


}


}


usercontrol ascx





<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TestUControl.ascx.cs" Inherits="TestUControl" %>


<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>








<ext:Label ID="test" runat="server">


</ext:Label>





<ext:Button runat="server" Text="Button">


<AjaxEvents><Click OnEvent="Test"><EventMask ShowMask="true" Msg="Loading"/></Click></AjaxEvents>


</ext:Button>


<br />

Vladimir
Oct 28, 2008, 1:18 PM
Hi Mikael,

Thanks for bug reporting. The bug was fixed and the code has been committed to the SVN. Please update and rebuild

Please, let me know about result

Jurke
Oct 28, 2008, 1:25 PM
Hi
No I get another error






setTimeout(function() {


if (result.script &amp;&amp; result.script.length > 0) {


eval(result.script); <------HALTS ON THIS


}


if (o.userSuccess) {


o.userSuccess(response, result, o.control, o.eventType, o.action, o.userParams);


}


}, delay);

Vladimir
Oct 28, 2008, 1:34 PM
Can you post value of result.script (when VS intercept error just select 'result.script' and move mouse over selection)?

Jurke
Oct 28, 2008, 4:28 PM
Hi, this is the value:

lblError.setText("",true);lblSalesId.setText("Testtext",true);wndPopup.setTitle("Browse info");wndPopup.setIconClass("icon-eye");wndPopup.setSize(710,326);wndPopup.loadIFrame(ht tp://localhost:49753/somepage.aspx);wndPopup.show();


/Mikael

Jurke
Oct 28, 2008, 4:33 PM
this is the code that causes the problem, this worked before the update and is a code that you helped me with in the first place.





<script type="text/javascript">


function loadInfoWindow(url, title)
{
var html = String.format("<iframe width=\"100%\" id=\"Window1_iframe\" height=\"100%\" src=\"{0}\" frameborder=\"0\"></iframe>", url);
wndInfo.body.update(html);
wndInfo.setTitle(title);
wndInfo.show();
}
</script>




protected void btnTest_Click(object sender, AjaxEventArgs e)
{
wndPopup.Title = "Test";
wndPopup.IconCls = "icon-eye";
wndPopup.AutoLoad = new Uri(HttpContext.Current.Request.Url, "SomePage.aspx").ToString(); <--Works if i // this code
wndPopup.Show();
}

Best regards
Mikael

Vladimir
Oct 28, 2008, 4:35 PM
Hi Mikael,

Thank you for your response!

Can you one more update and rebuild (i fixed bug with iframe)

Jurke
Oct 28, 2008, 4:54 PM
Thanks, it now works great. My project is gettint quite big, and soon I will release to customer. I hope it will get better with this major changed of code, I understand that its not 1.0 yet and you need to make changes but I lost half a day on this.
And an other thing, you always say that I need to clear my chache. How does that work if random internet users is using my site that uses coolite, then you change something big and tell me to clear my chache. How will that affect the users of the site? I cant tell them to clear their chach?

Best regards
Mikael Jûrke

Vladimir
Oct 28, 2008, 5:04 PM
Hi Mikael,

We apologize for any inconvenience you have had today

About clear cache. Now it is not required because with each new build the script files have unique number in url. When I said to clear cache today it was just in case.

<div id="result_box" dir="ltr">You can not worry about users, they would not need to clean the cache

geoffrey.mcgill
Oct 28, 2008, 5:25 PM
Hi Mikael,</p>

Clearing your browser cache should not be required anymore. We introduced features a while back that should prevent browser caching issues when changing or rebuilding the .dll, see http://forums.ext.net/showthread.php?threadid=3311-16-2.aspx</p>

I believe the recommendation to clear your browser cache by Vladimir was just a precautionary measure.</p>

If you're building daily from SVN, then you must expect problems to crop up. The SVN /trunk/ should never be considered stable, except for maybe a few hours before and after a public release. Of course we always try our best to ensure we do not commit bugs, but unfortunately they do (and will continue to) happen. There's just no getting around that.</p>

Another option would be to wait until public releases before upgrading your project. At the public release the code base has gone through a testing cycle and minor defects such as you experienced today should not be an issue.</p>

Breaking changes between releases are documented in the Release Notes forum, see http://forums.ext.net/forumdisplay.php?forumid=12-1.aspx</p>

Any major breaking changes are publicly announced and feedback is sought before committing to the change. Everyone is given the opportunity to comment.</p>

The breaking change from <Content> to <Body> was posted 10 days ago, see  http://forums.ext.net/showthread.php?threadid=3059-7-1.aspx</p>

I hope this helps answer your questions.

</p>

Timothy
Oct 28, 2008, 5:33 PM
I've been caught in a similar situation before with the SVN trunk and when it gets really bad, for instance when I update between Geoffrey and vlad checking in, I revert to the last good revision.

After waiting 30 minutes, I will check the revision number and if nothing has changed, I will start submitting bug reports against my example projects.

Hope that helps.

Cheers,
Timothy

geoffrey.mcgill
Oct 28, 2008, 5:36 PM
Timothy,

That's great advice! You've got us figured out. ;)

Jurke
Oct 28, 2008, 5:51 PM
Hi guys
Thank for the info. I think you all do a great work and of course there will always be bugs.
I will have to read more about updates before I update from the svn. Of course you need to do breaking changes, I just got terrified when nothing worked in my project.

Best regards
Mikael Jürke