Error deleting a page

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.
7/26/2006 12:01:33 PM
Gravatar
Total Posts 73

Error deleting a page

Hi,

When I try to remove a page from Add/Edit pages, e.g. the Forums page, I get an error:

Beschrijving: Er is een onverwerkte uitzondering opgetreden tijdens het uitvoeren van de huidige webaanvraag. Raadpleeg de stacktracering voor meer informatie over deze fout en de oorsprong ervan in de code.

Details van uitzondering: System.Data.SqlClient.SqlException: DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_mp_PageModules_mp_PageModules'. The conflict occurred in database 'Portal_Vuren', table 'mp_PageModules', column 'PageID'.
The statement has been terminated.

Fout in bron:

Regel 3805:			{
Regel 3806:				Connection.Close();
Regel 3807:				throw ex;
Regel 3808:			}
Regel 3809:		}

Bronbestand: D:\VurenPortal\MSSQLData\dbPortal.cs    Regel: 3807

Stacktracering:

[SqlException (0x80131904): DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_mp_PageModules_mp_PageModules'. The conflict occurred in database 'Portal_Vuren', table 'mp_PageModules', column 'PageID'.
The statement has been terminated.]
   mojoPortal.Data.dbPortal.PageSettings_DeletePage(Int32 PageID) in D:\VurenPortal\MSSQLData\dbPortal.cs:3807
   mojoPortal.Business.PageSettings.DeletePage(Int32 PageID) in D:\VurenPortal\Business\PageSettings.cs:472
   mojoPortal.Web.Pages.btnDelete_Click(Object sender, ImageClickEventArgs e) in D:\VurenPortal\Web\Admin\Pages.ascx.cs:149
   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +105
   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Serverfout in toepassing /RBSV.

DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_mp_PageModules_mp_PageModules'. The conflict occurred in database 'Portal_Vuren', table 'mp_PageModules', column 'PageID'.
The statement has been terminated.

 

I've setup a VurenPortal (copy of Mojo) and run all the scripts.

When I add my own page and delete it directly, I do not receive an error.

Anybody has a solution?

 

Jan

7/26/2006 12:10:09 PM
Gravatar
Total Posts 18439

Re: Error deleting a page

We should probably have better error handling for this but the problem is you must delete all modules from the page before you can delete the page. Another option is I could add code to automatically delete content from the page before deleting the page. That may be the best thing to do.

Joe
7/26/2006 12:27:48 PM
Gravatar
Total Posts 73

Re: Error deleting a page

I'm not sure about the other databases, but for MS SQL you could use the cascaded delete functionality.

Cheers,

Jan

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