Show Membership Graph not working in Release 2.2.7.6

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.
10/23/2008 4:46:55 AM
Gravatar
Total Posts 16

Show Membership Graph not working in Release 2.2.7.6

If I activate the Show Membership Graph-Option in the Statistics-feature, then I get the following error:

System.InvalidOperationException: The stored procedure 'mp_Users_GetCountByMonthYear' doesn't exist. at System.Data.SqlClient.SqlCommand.DeriveParameters() at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) at mojoPortal.Data.SqlHelperParameterCache.DiscoverSPParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at mojoPortal.Data.SqlHelperParameterCache.GetSPParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at mojoPortal.Data.SqlHelperParameterCache.GetSPParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) at mojoPortal.Data.SqlParameterHelper.InitializeArray() at mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt) at mojoPortal.Data.DBSiteUser.GetUserCountByYearMonth(Int32 siteId) at mojoPortal.Business.SiteUser.GetUserCountByYearMonth(Int32 siteId) at mojoPortal.Web.StatisticsUI.SiteStatisticsModule.OnRenderUserChart(ZedGraphWeb z, Graphics g, MasterPane masterPane) at ZedGraph.Web.ZedGraphWeb.OnDrawPane(Graphics g, MasterPane mp) at ZedGraph.Web.ZedGraphWeb.CreateGraph(Stream OutputStream, ImageFormat Format, Boolean bShowTransparency) at ZedGraph.Web.ZedGraphWeb.Render(HtmlTextWriter output)

Database is up-to-date, regarding to setup/default.aspx. Stored proc  mp_Users_GetCountByMonthYear is missing. In the SVN-trunk, I only found one occurence of the name, in dbSiteUser.cs

10/23/2008 10:00:54 AM
Gravatar
Total Posts 18439

Re: Show Membership Graph not working in Release 2.2.7.6

That procedure is the only thing in the 2.2.7.6.config upgrade script. It exists in webroot/Setup/applications/mojoportal-core/SchemaUpgradeScripts/mssql/2.2.7.6.config

Maybe you had an ftp error and it created an empty file there, but it does exist in the .zip package.

Hope it helps,

Joe

10/24/2008 6:02:49 AM
Gravatar
Total Posts 16

Re: Show Membership Graph not working in Release 2.2.7.6

Hello Joe!

My first post was not entirely satisfactory to explain this error. The file you mentioned is there, but the database has a different version number. Database version is 2.2.7.5, not 2.2.7.6.

Regards, Markus

10/24/2008 7:50:43 AM
Gravatar
Total Posts 18439

Re: Show Membership Graph not working in Release 2.2.7.6

Doh! I see you are right, apparently I did not increment the version in code when I made the release build so its not running that script on the setup page. I will be making another incremental release within the next 2 weeks, but if you want to fix it right away just run that script manually then increment your version in the mp_SchemaVersion table manually.

Thanks,

Joe

10/24/2008 8:35:47 AM
Gravatar
Total Posts 16

Re: Show Membership Graph not working in Release 2.2.7.6

Hello Joe!

Apart from not updating to 2.2.7.6, there is a Problem with the StoredProc under SQL-Server 2000. I could not create the proc, unless grouping the with the statement which produces the "label"-column.

New SQL:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[mp_Users_GetCountByMonthYear]


@SiteID int

AS
SELECT YEAR(DateCreated) As Y,
MONTH(DateCreated) As M,
CONVERT(varchar(10),YEAR(DateCreated)) + '-' + CONVERT(varchar(3),MONTH(DateCreated)) As Label,
COUNT(*) As Users
FROM mp_Users
WHERE SiteID = @SiteID
GROUP BY YEAR(DateCreated), MONTH(DateCreated), CONVERT(varchar(10), YEAR(DateCreated)) + '-' + CONVERT(varchar(3), MONTH(DateCreated))
ORDER BY YEAR(DateCreated), MONTH(DateCreated)

GO

It's because SQL-Server 2000 analyses per "field". I remember this as being one of the live-saving improvements in SQL 2005. Anyway, now it works.

Have a nice weekend, Markus

10/24/2008 8:47:28 AM
Gravatar
Total Posts 18439

Re: Show Membership Graph not working in Release 2.2.7.6

Thanks! I'll make the same change here.

Best,

Joe

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