Database error with Version

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/12/2009 4:39:28 AM
Gravatar
Total Posts 5

Database error with Version

Hi Joe,

I have been getting the following error when I try to add a content in the page

======================================

Server Error in '/' Application.

Invalid cast from 'DateTime' to 'Int32'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Invalid cast from 'DateTime' to 'Int32'.

Source Error:

Line 146: module.CreatedByUserId = SiteUtils.GetCurrentSiteUser().UserId;

Line 147: module.CacheTime = moduleDefinition.DefaultCacheTime;

Line 148: module.Save();

Line 149: WebUtils.SetupRedirect(this, SiteRoot

Line 150: + "/Admin/ContentManagerPreview.aspx?mid="

Source File: C:\keating\ksc-web\mojoportal\Web\Admin\ContentCatalog.aspx.cs Line: 148

Stack Trace:

[InvalidCastException: Invalid cast from 'DateTime' to 'Int32'.]

======================================

I was using version 2.3.1.0 in windows Vista, everything was fine. But when I downloaded new version 2.3.1.9 and was trying to test with different Database, but It was not installed with new db for some reasons. Then I linked with 2.3.1.0 Database for a quick test. It has done some setup works. Now I get error to add content or page if i use old version. I don't see other 2 sites (though I copied the sites files in the data folder) when I use new version (2.3..1.9). 

Could you please guide me, to use any version without errors? I just need to use existing data. 

 

Thanks for your help. 

 

regards,

Monir



11/12/2009 4:50:17 AM
Gravatar
Total Posts 550

Re: Database error with Version

Hi Monir,

I recommend you to upgrade to recently released version , 2.3.2.9.

I error occur again let we know.

Hope Helps,

Asad

11/12/2009 5:35:05 AM
Gravatar
Total Posts 5

Re: Database error with Version

Hi Asad,

Thanks for the quick reply. 

I just copied 2.3.2.9 as a virtual application in IIS and ran it as http://web-pc/v3. It again did some setup work with schema (don't know whether it's changing the original DB structure) and found the homepage ok. But I can't see the site (id=3) as http://web-pc/v3/de, though I have made a folder called 'de' with default.aspx and copied folder '3' in /data/sites/ folder. 

can I go back version 2.3.1.0 fixing the error of adding new page/content. still same error. Though there is no problem in adding page or content in version 2.3.2.9 except multiple site. 

 

I am using .net 2.0 and I have configured web.config for this. 

 

Best regards,

Monir

11/12/2009 6:41:50 AM
Gravatar
Total Posts 18439

Re: Database error with Version

Current versions of mojoPortal require ASP.NET 3.5 SP1.

It sounds like you have made your own build from the source code, because the latest version will not build against 2.0 .NET, I'm sorry its not working for you but I do not know any way to help you with an error in that situation because your code is not in a known state. The error itself sounds like a stored procedure is out of sync with data access code and has more or fewer parameters than what the stored procedure expects or you have an error in your version of the code declaring a parameter incorrectly.

As far as the folder url not working, I would go into site settings for the root site, select the child site from the list and check if the folder mapping is still there.

Hope it helps,

Joe

11/12/2009 6:43:53 AM
Gravatar
Total Posts 550

Re: Database error with Version

Hi,

Add a sub site from Administration->SiteSetting menu , no by copying a folder .When you add a new site from the site setting menu the corresponding folder create automatically.

Hope Helps,

Asad

11/12/2009 7:08:03 AM
Gravatar
Total Posts 5

Re: Database error with Version

Thanks guys. Wow! what a quick response.

Unfortunately my hosting server doesn't support 3.5 for my account. :( . so I got to leave. I'll build the database again on the local pc and export it to the hosting server. if there is any quick fix on .net 2.0 please let me know.

yes, I used it the source initially. Now if i get the child sites running, would be great relief, though site is running slow.

I checked child sites, it has 'de' folder mapped. I also have de folder with empty file called 'default.aspx'. I also created a new child site, a 'test' folder with default.aspx. but Both are blank when i browse.

I really appreciate your time.

regards,

Monir

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