Total Revenue Error

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
2/8/2009 12:14:34 PM
Gravatar
Total Posts 55

Total Revenue Error

Hi!

After SVN-ing the newest MP, compiling  is fine, but following error occurs when starting Setup (revision is 4768, I think):

 

An Error Occurred:TotalRevenue
Source:System.Data
Stack Trace at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) at System.Data.SqlClient.SqlDataReader.get_Item(String name) at mojoPortal.Business.SiteUser.GetUser(IDataReader reader) in E:\MojoPortali\Izvornik\mojoPortal.Business\SiteUser.cs:line 566 at mojoPortal.Business.SiteUser.GetUser(String loginInfo) in E:\MojoPortali\Izvornik\mojoPortal.Business\SiteUser.cs:line 532 at mojoPortal.Business.SiteUser..ctor(SiteSettings settings, String login) in E:\MojoPortali\Izvornik\mojoPortal.Business\SiteUser.cs:line 85 at mojoPortal.Business.SiteUser.GetRoles(SiteSettings siteSettings, String identity) in E:\MojoPortali\Izvornik\mojoPortal.Business\SiteUser.cs:line 2016 at mojoPortal.Web.mojoRoleProvider.GetRolesAndSetCookie() in E:\MojoPortali\Izvornik\Web\Components\mojoRoleProvider.cs:line 270 at mojoPortal.Web.mojoRoleProvider.GetRolesForUser(String userName) in E:\MojoPortali\Izvornik\Web\Components\mojoRoleProvider.cs:line 241 at System.Web.Security.RolePrincipal.IsInRole(String role) at mojoPortal.Business.WebHelpers.WebUser.IsInRole(String role) in E:\MojoPortali\Izvornik\mojoPortal.Business.WebHelpers\WebUser.cs:line 18 at mojoPortal.Business.WebHelpers.WebUser.get_IsAdmin() in E:\MojoPortali\Izvornik\mojoPortal.Business.WebHelpers\WebUser.cs:line 64 at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) in E:\MojoPortali\Izvornik\Web\Setup\Default.aspx.cs:line 60 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

Error corresponds to this line in mojoPortal.Business -> SiteUser.cs file:

this.totalRevenue = Convert.ToDecimal(reader["TotalRevenue"], CultureInfo.InvariantCulture);

If I comment out right side of equation and write 0 (this.totalRevenue = 0;), everything's fine.

 

2/8/2009 12:16:52 PM
Gravatar
Total Posts 18439

Re: Total Revenue Error

You should always visit /Setup/Default.aspx after doing svn update and rebuild.

That should solve it.

Best,

Joe

2/8/2009 12:56:23 PM
Gravatar
Total Posts 55

Re: Total Revenue Error

Ummm...well, I did run Setup/Default.aspx and error message was pasted from that page...

2/8/2009 2:52:47 PM
Gravatar
Total Posts 550

Re: Total Revenue Error

Hi Joe

I have this error too. I try to discover it.

Best

Asad

2/8/2009 3:18:34 PM
Gravatar
Total Posts 550

Re: Total Revenue Error

Hi Joe

I find. This error occur because "TotalRevenue" field not exist in mp_Users table.

Best

Asad.

 

2/8/2009 4:16:14 PM
Gravatar
Total Posts 18439

Re: Total Revenue Error

The upgrade scripts add this new column. I did not think it would raise this error on the setup page but if you both say it does I of course believe it, so I've put a more general catch for that error. If you do svn update again and rebuild the solutiuon and visit /Setup/Default.aspx it should be fixed now.

Best,

Joe

2/8/2009 4:23:54 PM
Gravatar
Total Posts 550

Re: Total Revenue Error

Hi Joe

I think this line of code execute before updates scripts run against database.

best

Asad.

You must sign in to post in the forums. This thread is closed to new posts.