ERROR: 42601: syntax error at or near ":" when adding features

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.
1/31/2010 12:30:55 AM
Gravatar
Total Posts 4

ERROR: 42601: syntax error at or near ":" when adding features

Hi,

I have just installed mojoportal in my server, my configuration is as follows:

Window Server 2003

IIS + .Net 3.5 sp1

Postgres 8.3.5

MojoPortal 2.3.3.4

I have manage to install and test a few functions of mojoportal, but I've encounter the following error when I try to add a new feature following the tutorial on http://www.mojoportal.com/hello-world-developer-quick-start.aspx. I think its the SQL string causing the error.

ERROR: 42601: syntax error at or near ":"

Exception Details: Npgsql.NpgsqlException: ERROR: 42601: syntax error at or near ":"

Is it a bug or do I need to do something to my database? Also, when I try to debug in Visual Studio 8 Express, the IDE give me the following bug:

Error 46 Could not load type 'mojoPortal.Web.ContactUI.MessageListPage'. F:\Inetpub\wwwroot\mojo\ContactForm\MessageList.aspx 1
 

Once I exclude the file MessageList.aspx, the debugging is able to continue. Is this a missing file?

Thanks in advance.

 

Regards,

Stephen


  

1/31/2010 2:37:56 PM
Gravatar
Total Posts 18439

Re: ERROR: 42601: syntax error at or near ":" when adding features

You can and should delete that file, it was a packaging error to include it.

You are using the pre-compiled deployment file package which is meant for production deployment rather than development in VS.

Note that the presence of that file causes no problem under IIS, it is only because you are opening it as a Web Site in VS that it causes this error because VS assumes it is part of the project as it assumes for all files in a Web Site Project and it is trying to compile everything even though everything is already compiled.

For development I recommend using the source code package which has the VS solution and project files as mojoPortal is really a Web Application Project (not a Web Site Project) with a .csproj file indicating which files are part of the project.

Hope it helps,

Joe

2/1/2010 9:19:56 PM
Gravatar
Total Posts 4

Re: ERROR: 42601: syntax error at or near ":" when adding features

Thanks Joe,

Appreciate for the speedy reply. However, back to my original question, any reason why I'm having the ERROR: 42601: syntax error at or near ":" when adding the sample feature? Do I need to upgrade to Postgres 8.4?

Best regards,

Stephen

2/2/2010 8:24:00 AM
Gravatar
Total Posts 18439

Re: ERROR: 42601: syntax error at or near ":" when adding features

Can you post more of the stack trace for the error so I can see what method and line of code it is happening at?

2/2/2010 10:29:18 AM
Gravatar
Total Posts 4

Re: ERROR: 42601: syntax error at or near ":" when adding features

Sure Joe, appreciate your effort in helping me out. The details are as follows:

 

2010-02-03 00:27:30,250 ERROR mojoPortal.Web.Global - 60.50.180.102-en-US - /Admin/ModuleDefinitions.aspx?defid=-1
Npgsql.NpgsqlException:
syntax error at or near ":"
Severity: ERROR
Code: 42601
at Npgsql.NpgsqlState.<ProcessBackendResponses_Ver_3>d__a.MoveNext()
at Npgsql.ForwardsOnlyDataReader.GetNextResponseObject()
at Npgsql.ForwardsOnlyDataReader.GetNextRowDescription()
at Npgsql.ForwardsOnlyDataReader.NextResult()
at Npgsql.ForwardsOnlyDataReader..ctor(IEnumerable`1 dataEnumeration, CommandBehavior behavior, NpgsqlCommand command, NotificationThreadBlock threadBlock, Boolean synchOnReadError)
at Npgsql.NpgsqlCommand.GetReader(CommandBehavior cb)
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
at mojoPortal.Data.NpgsqlHelper.ExecuteNonQuery(NpgsqlConnection connection, CommandType commandType, String commandText, NpgsqlParameter[] commandParameters)
at mojoPortal.Data.NpgsqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, NpgsqlParameter[] commandParameters)
at mojoPortal.Data.DBModuleDefinition.AddModuleDefinition(Guid featureGuid, Int32 siteId, String featureName, String controlSrc, Int32 sortOrder, Int32 defaultCacheTime, String icon, Boolean isAdmin, String resourceFile, Boolean isCacheable, Boolean isSearchable, String searchListName, Boolean supportsPageReuse, String deleteProvider)
at mojoPortal.Business.ModuleDefinition.Create()
at mojoPortal.Business.ModuleDefinition.Save()
at mojoPortal.Web.AdminUI.ModuleDefinitions.UpdateBtn_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thanks in advance.

Regards,

Stephen 

2/2/2010 12:19:10 PM
Gravatar
Total Posts 18439

Re: ERROR: 42601: syntax error at or near ":" when adding features

Hi Stephen,

I confirm this as a bug in the 2.3.3.4 and 2.3.3.4.b releases for pgsql. I have this fixed in my copy and in our svn code repository and plan to make a new release within the next 2 days. Keep an eye on our blog for a release announcement.

Best,

Joe

2/2/2010 2:27:38 PM
Gravatar
Total Posts 4

Re: ERROR: 42601: syntax error at or near ":" when adding features

Your the MAN Joe! Thanks a lot, can't wait to download the new code.

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