Delete forum page error

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.
8/14/2006 12:33:27 PM
Gravatar
Total Posts 68

Delete forum page error

Hi,I tried to delete the forum page from Add/Edit Pages, but I go this error, Im not using the latest from svn though, how can I fix this problem?
Thanks, Christian

The DELETE statement conflicted with the REFERENCE constraint "FK_mp_PageModules_mp_PageModules". The conflict occurred in database "ims", table "dbo.mp_PageModules", column 'PageID'.
The statement has been terminated.

Beskrivning: Ett undantag som inte kunde hanteras uppstod när den aktuella webbegäran kördes. Mer information om felet och var i koden det uppstod finns i stackspårningen.

Undantagsinformation: System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_mp_PageModules_mp_PageModules". The conflict occurred in database "ims", table "dbo.mp_PageModules", column 'PageID'.
The statement has been terminated.

Källfel:

Rad 147:					if(page.PageID.ToString() == lbPages.SelectedValue)
Rad 148: {
Rad 149: PageSettings.DeletePage(page.PageID);
Rad 150:
Rad 151: page.IndexPath = Page.Server.MapPath(SiteUtils.GetApplicationRoot()
8/14/2006 1:56:21 PM
Gravatar
Total Posts 18439

Re: Delete forum page error

Just delete the contents from the page first, ie delete any modules on the page first, then delete the page. If its a forum module you may have to delete the posts and threads before you delete the module

Hope it helps,

Joe
8/14/2006 3:02:53 PM
Gravatar
Total Posts 18439

Re: Delete forum page error

also if the version you are running has the Content Manager, you can unpublish the content from that page and then the page will delete without error.

Joe
8/15/2006 1:18:45 AM
Gravatar
Total Posts 68

Re: Delete forum page error

Yep, that worked, thank you! A suggestion would be to have a error message saying just that.

Christian
8/15/2006 3:41:42 AM
Gravatar
Total Posts 18439

Re: Delete forum page error

In the next release I will make it delete child objects automatically.

Cheers,

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