Cannot insert NULL - URL Manager - 2.2.5.2. MSSQL

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.
5/20/2008 4:02:51 AM
Gravatar
Total Posts 43

Cannot insert NULL - URL Manager - 2.2.5.2. MSSQL

Hi,

Using "mojoPortal Version 2.2.5.2 MSSQL" I was attempting to add a friendly URL mapping from the URL Manager (Admin/UrlManager.aspx). Typing in a URL and choosing from the DropDownList, then pressing Add New URL Mapping, causes a SQL Exception.

"System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'UrlID', table 'MojoPortal.dbo.mp_FriendlyUrls'; column does not allow nulls. INSERT fails."

I created the entry manually with SSMS incrementing the PK value by one. I presume this is a bug with the code not generating a unique ID, since when creating the pages in the first place they all seem to have friendly URLS mapped to them.

Or perhaps the UrlID field should be an identity column? If so, I did copy a this mojoportal database from another mojoportal DB - this may have lost the identity specification.....

 

 

 

5/20/2008 5:48:14 AM
Gravatar
Total Posts 18439

Re: Cannot insert NULL - URL Manager - 2.2.5.2. MSSQL

Hi,

Yes, UrlID is a primary key and identity auto increment column, so it sounds like you lost this property. Normally this would not be lost in restoring a db from one machine to another, but importing tables from one db to another will lose things like primary keys, foreign keys, identity specifications.

So what I would be worried about is what else got lost on other tables in addition to this one.

Best,

Joe

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