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)
12/6/2004 2:49:37 PM
Gravatar
Total Posts 18439

Re: Error on Admin Section

The error when you click the admin page link is because I forgot to remove something from the create data script when I removed the Users.ascx module. To fix that you need to

DELETE FROM mp_ModuleDefinitions WHERE ModuleDefID = 15

and also

DELETE FROM mp_Modules WHERE ModuleDefID = 15

The users are now managed from the Member List Page by login as admin, Users.ascx no longer exists in the project.

I will fix the create data script for the next release.

I'll look into the blank page issue next.

12/7/2004 12:40:47 AM
Gravatar
Total Posts 18439

Re: Error on Admin Section

The blank page is a broken link, it should be pointing to PageSettings.aspx not PageLayout.aspx. I will have a new release with this fixed by the weekend.
12/7/2004 2:07:56 AM
Gravatar
Total Posts 8

Re: Error on Admin Section

Ok no problem ;)
thank you for the help
Sebastian
7/29/2011 6:33:23 PM
Gravatar
Total Posts 1

Re: Error on Admin Section

Hi,

after the upgrade to version 2.3.6.7 when I click on admin menu (after login) I get the following error (excuse me for my english)

---------

We're sorry but a server error has occurred while trying to process your request.

The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page.

---------

post scriptum

I can modify existing page with modify menu but I Can't access to the admin section

7/30/2011 7:51:06 AM
Gravatar
Total Posts 18439

Re: Error on Admin Section

most likely the problem is that you did not use the Web.config file that shipped with the new version of mojoPortal, you kept your old one. You need to use the new one and restore your customizations such as machine key from the old one.

If that doesn't solve it then start with Basic Troubleshooting

Hope that helps,

Joe

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