Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Error Deleting PortalError Deleting Portal
Previous
 
Next
New Post
9/26/2008 2:07 PM
 

I need to delete and recreate a Portal.  When I go to Host/Portals and click the X  to delete it (and answer yes to the pop-up, after a few moments (maybe 15 seconds), the following (below) is displayed.  Any ideas?  The portal still shows in the portal list, but when I browse to the portals Alias I get an error now (see further below, "Object Reference...").  The other portals appear to be working fine.  I don't want to break my DNN instance, how can I get that partially deleted portal removed without making things worse?

Error: Portals is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated. ---> System.Data.SqlClient.SqlException: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Data.SqlDataProvider.DeletePortalInfo(Int32 PortalId) at DotNetNuke.Entities.Portals.PortalController.DeletePortalInfo(Int32 PortalId) at DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath) at DotNetNuke.Modules.Admin.Portals.Portals.grdPortals_DeleteCommand(Object source, DataGridCommandEventArgs e) --- End of inner exception stack trace---


Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   DotNetNuke.Entities.Portals.PortalSettings.GetSiteSetting(Int32 PortalId, String SettingName) +36
   DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +4311
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434


- Accuraty / Jeremy
 
New Post
9/27/2008 11:55 AM
 

Maybe fixing this directly is too much to ask.  Instead, could someone at least give me some tips on how to figure out what the missing object is?  I can see that the code is expecting a portal setting (DotNetNuke.Entities.Portals.PortalSettings.GetSiteSetting(...)), how can I figure out which setting is being requested?

Also, doesn't this imply that this code needs some exception handling added?  If it really is just a missing setting (I am assuming a record with the SettingName doesn't exist in the table), maybe the .GetSiteSetting() function needs to be able to return a default or a Null without blowing an ugly error like this.


- Accuraty / Jeremy
 
New Post
9/27/2008 7:26 PM
 

What PortalId is it? I seem to remember that you can not delete portal 0 (too much code assumes there is a portal 0).

JK.


You know your website is cool, so why not let your users help you by spreading the word on social networking sites - get the DotNetNuke Social Bookmarks Module with 57 different ways to add social bookmarks to your site ... or download the FREE demo right now
 
New Post
9/27/2008 7:45 PM
 

Nope, definitely not portal zero.  The Portal ID is 12 and the Portal root path is "Portals/TH/", I always rename them to something applicable/logical.  As a matter of fact, this portal was just created 1 day before I needed to delete it.  Other than being restored from an export/template, very little had been done to it.


- Accuraty / Jeremy
 
New Post
11/30/2008 12:41 PM
 

I am also getting the same "Subquery returned more than 1 value." message when I try to delete a portal. I have tried deleting the portals directly from the Portals table in the database but get the same result. My guess is there is a problem with one of the relationships in the Portals table.

Has anybody found a solution for this? I would really like to remove the portals completely from the database.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Error Deleting PortalError Deleting Portal


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out