Error on Admin Section

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.
12/5/2004 10:44:50 AM
Gravatar
Total Posts 8

Re: Error on Admin Section

I have received this error when i have clicked on the menu Add/Edit Pages from HomePage what
is the cause?

Bye

Sebastian

ByteFX.Data.MySqlClient.MySqlException: You have an error in your SQL syntax
check the manual that corresponds to your MySQL server version for the right syntax to use
near SiteID = 1 ORDER BY PageOrder at line 1

in <0x000e0> ByteFX.Data.MySqlClient.Driver:ReadPacket ()
in <0x00092> ByteFX.Data.MySqlClient.Driver:Send (ByteFX.Data.MySqlClient.DBCmd,byte[])
in <0x000be> ByteFX.Data.MySqlClient.MySqlCommand:ExecuteBatch (bool)
in <0x0005a> (wrapper remoting-invoke-with-check) ByteFX.Data.MySqlClient.MySqlCommand:ExecuteBatch (bool)
in <0x00077> ByteFX.Data.MySqlClient.MySqlDataReader:NextResult ()
in <0x0005d> (wrapper remoting-invoke-with-check) ByteFX.Data.MySqlClient.MySqlDataReader:NextResult ()
in <0x0013a> ByteFX.Data.MySqlClient.MySqlCommand:ExecuteReader (System.Data.CommandBehavior)
in <0x00054> (wrapper remoting-invoke-with-check) ByteFX.Data.MySqlClient.MySqlCommand:ExecuteReader (System.Data.CommandBehavior)
in <0x00012> ByteFX.Data.MySqlClient.MySqlCommand:System.Data.IDbCommand.ExecuteReader (System.Data.CommandBehavior)
in <0x000be> System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet,int,int,string,System.Data.IDbCommand,System.Data.CommandBehavior)
in <0x00045> System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet)
in <0x0013a> ByteFX.Data.MySqlClient.MySqlHelper:ExecuteDataset (ByteFX.Data.MySqlClient.MySqlConnection,string,ByteFX.Data.MySqlClient.MySqlParameter[])
in <0x00054> ByteFX.Data.MySqlClient.MySqlHelper:ExecuteDataset (string,string,ByteFX.Data.MySqlClient.MySqlParameter[])
in <0x00f2b> mojoPortal.Data.dbPortal:PageSettings_GetPageTree (int)
in <0x00054> mojoPortal.Business.PageSettings:GetPageTree (int)
in <0x001cc> mojoPortal.Web.Pages:Page_Load (object,System.EventArgs)
in <0x00069> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
in <0x00067> System.Web.UI.Control:OnLoad (System.EventArgs)
in <0x00024> System.Web.UI.Control:LoadRecursive ()
in <0x000ad> System.Web.UI.Control:LoadRecursive ()
in <0x000ad> System.Web.UI.Control:LoadRecursive ()
in <0x000ad> System.Web.UI.Control:LoadRecursive ()
in <0x000ad> System.Web.UI.Control:LoadRecursive ()
in <0x000ad> System.Web.UI.Control:LoadRecursive ()
in <0x00198> System.Web.UI.Page:InternalProcessRequest ()
in <0x000c2> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in <0x002eb> ExecuteHandlerState:Execute ()
in <0x00084> StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool)
12/5/2004 1:30:49 PM
Gravatar
Total Posts 18439

Re: Error on Admin Section

It seems like a problem in the data. I would check the mp_Pages table and make sure there are no Nulls in the PageOrder field and that this field has a default value. Also make sure all pages have SiteID = 1.

Let me know if this helps or not. Are you using the latest version of mojoPortal?
12/5/2004 8:53:44 PM
Gravatar
Total Posts 8

Re: Error on Admin Section

Yes i have downloaded the lasted version from your site, and i have installed it without modification i have only modified the ConnectionString ;), i go to control the database and i send you ill'you an answer on this morning,

Excuse for my bad english i am italian ;)

12/5/2004 11:13:54 PM
Gravatar
Total Posts 8

Re: Error on Admin Section

I have verified the data on the database and all  are corect, but the problem persist
Bye
sebastian
12/6/2004 6:16:38 AM
Gravatar
Total Posts 18439

Re: Error on Admin Section

Hi Sebastian,

Can you give me more info? What version of ByteFX are you using? What version of MySQL are you using? What OS? Are you using the release files or did you compile from the sources?

Thanks,

Joe

12/6/2004 7:44:05 AM
Gravatar
Total Posts 8

Re: Error on Admin Section

i  use ArchLinux  distro , with mono 1.0.4 with the integrated ByteFX and MySql 4.1.7-3 under apache and mod-mono ;)
12/6/2004 7:44:48 AM
Gravatar
Total Posts 8

Re: Error on Admin Section

i have used your binary distribution
12/6/2004 8:35:47 AM
Gravatar
Total Posts 18439

Re: Error on Admin Section

Hi Sebastian,

I think I found the problem in the code. I'm surprised it wasn't giving me an error. When I get home from work I will fix and recompile mojoPortal.Data.dll and post a link for you.

I think the probnlem is in the method:

public static DataSet PageSettings_GetPageTree(int SiteID)
  {

...

sqlCommand.Append("INSERT INTO PageTree(PageID,PageName,ParentID,PageOrder,NestLevel,TreeOrder) ");
   sqlCommand.Append("SELECT  PageID,PageName,ParentID,PageOrder,0,1000000 + PageOrder ");
   sqlCommand.Append("FROM mp_Pages ");
   sqlCommand.Append("WHERE   ParentID IS NULL  OR ParentID = -1AND SiteID = @SiteID ");
   sqlCommand.Append("ORDER BY PageOrder; ");

}

It should be like this:

sqlCommand.Append("WHERE   (ParentID IS NULL  OR ParentID = -1) AND SiteID = @SiteID ");
   sqlCommand.Append("ORDER BY PageOrder; ");

It needs a space between the -1 and the "AND"

Best Regards,

Joe

12/6/2004 10:54:43 AM
Gravatar
Total Posts 8

Re: Error on Admin Section

thank you
12/6/2004 12:27:02 PM
Gravatar
Total Posts 18439

Re: Error on Admin Section

Try replace mojoPortal.Data.dll with this file

Then you may need to do killall mono

Let me know if this solves the problem.

Thanks,
Joe
12/6/2004 1:29:59 PM
Gravatar
Total Posts 8

Re: Error on Admin Section

ok the section Add/Edit Pages Now show, but Add new page don't? work it show a blank page, and i have find this error when clicked on Admin link on home page
Bye,
Sebastian

System.IO.FileNotFoundException: File '/home/wwwrun/dotnet/portal/Admin/Users.ascx' not found.
in <0x00215> System.IO.StreamReader:.ctor (string,System.Text.Encoding,bool,int)
in <0x0001a> System.IO.StreamReader:.ctor (string,System.Text.Encoding)
in <0x00069> (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string,System.Text.Encoding)
in <0x0003e> System.Web.Compilation.AspGenerator:InitParser (string)
in <0x000f4> System.Web.Compilation.AspGenerator:GetCompiledType ()
in <0x00036> System.Web.UI.UserControlParser:CompileIntoType ()
in <0x00041> System.Web.UI.UserControlParser:GetCompiledType (string,string,System.Web.HttpContext)
in <0x000b4> System.Web.UI.TemplateControl:GetTypeFromControlPath (string)
in <0x0001d> System.Web.UI.TemplateControl:LoadControl (string)
in <0x0060c> mojoPortal.Web.SiteHome:Page_Load (object,System.EventArgs)
in <0x00069> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
in <0x00067> System.Web.UI.Control:OnLoad (System.EventArgs)
in <0x00024> System.Web.UI.Control:LoadRecursive ()
in <0x00198> System.Web.UI.Page:InternalProcessRequest ()
in <0x000c2> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
in <0x002eb> ExecuteHandlerState:Execute ()
in <0x00084> StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool)
You must sign in to post in the forums. This thread is closed to new posts.