1

Closed

Error when placing the module on a page

description

Upon placing the DNN By Invitation module on a page I get the below error and the page hangs:



AbsoluteURL:/Default.aspx

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:c2d4015a-0af6-4465-8222-ef5a3d218eac

AssemblyVersion:7.4.2

PortalId:0

UserId:1

TabId:109

RawUrl:/pl/konopianie

Referrer:http://spec-pruszkow.info/pl/Strona-test

UserAgent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0

ExceptionHash:UuSFxmCX20I1wrJmoBXqnw==

Message:Cannot insert duplicate key row in object 'dbo.Tabs' with unique index 'IX_Tabs_PortalLevelParentOrder'. The duplicate key value is (0, 0, , 1, 0). The statement has been terminated. The 'AddTab' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.

StackTrace:

InnerMessage:Cannot insert duplicate key row in object 'dbo.Tabs' with unique index 'IX_Tabs_PortalLevelParentOrder'. The duplicate key value is (0, 0, , 1, 0). The statement has been terminated. The 'AddTab' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.

InnerStackTrace:

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at PetaPoco.Database.ExecuteScalar[T](String sql, Object[] args)
at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteScalar[T](String connectionString, CommandType type, Int32 timeout, String sql, Object[] args)
at DotNetNuke.Data.SqlDataProvider.ExecuteScalar[T](String procedureName, Object[] commandParameters)
at DotNetNuke.Data.DataProvider.AddTabToEnd(TabInfo tab, Int32 createdByUserID)
at DotNetNuke.Entities.Tabs.TabController.AddTabInternal(TabInfo tab, Int32 afterTabId, Int32 beforeTabId, Boolean includeAllTabsModules)
at DotNetNuke.Entities.Tabs.TabController.AddTab(TabInfo tab, Boolean includeAllTabsModules)
at WESNet.DNN.Modules.ByInvitation.Utilities.AddPage(Int32 portalId, Int32 parentId, String tabName, String description, String tabIconFile, String tabIconFileLarge, Boolean isVisible, TabPermissionCollection permissions, Boolean isAdmin)
at WESNet.DNN.Modules.ByInvitation.Configuration.VerifyOrAddInvitationProcessor()
at WESNet.DNN.Modules.ByInvitation.SendInvitation.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Source:

FileName:

FileLineNumber:0

FileColumnNumber:0

Method:

Nazwa serwera: Anemone


After removing the module from the page, the page works OK.
Closed Dec 10, 2016 at 1:19 PM by imagemaker

comments

Greg_Greensky wrote Oct 20, 2015 at 6:21 AM

Forgot to mention that DNN is 4.3.2 and NET Framework is 4.0.30319.42000.

Does the NET Framework version have to do with the error?

imagemaker wrote Oct 30, 2015 at 11:45 PM

Greg,

I was not able to reproduce this error after installing By Invitation v 1.00.03 in a DNN v 7.4.2 test site and placing the By Invitation module on a page. Since the error is occurring when the module attempts to add the hidden By Invitation Processor page, I tested several cases in which the By Invitation Processor module or its By Invitation Processor page was deleted but in all cases, the processor page was correctly recreated without error.

I then noticed in the DNN Tabs table schema of my test install that the 'IX_Tabs_PortalLevelParentOrder' index is NOT unique while your error indicates that it is unique. I am guessing that you have applied the TurboDNN scripts to your installation as this index was made unique and the AddTabXXX stored procedures modified accordingly. In looking at the issues/discussion for the TurboDNN project at CodePlex, it appears that there were several versions of the TurboDNN09 script for DNN 7.4.2 released with a couple of them correcting issues with the AddTabAtEnd/AddTabAtPos stored procedures one of which was to correct a unique index violation (IX_Tabs_PortalLevelParentOrder) when adding a top level page. Please advise if you have installed the latest TurboDNN script (TurboDNN09m) which I think may take care of the problem. As I don't use the TurboDNN scripts, I will have to set up a new DNN 7.4.2 install to test this.

Regarding your question as to .NET Framework version, I'm not sure why you are saying that DNN is 4.3.2 as the error message you posted shows it is the latest DNN version 7.4.2. The By Invitation Module requires .NET 4.5 which will still show as version 4.0. Most hosting providers have upgraded to .NET 4.5 so this should not be a problem.

Greg_Greensky wrote Nov 11, 2015 at 1:26 PM

Imagemaker,

Thanks for your answer. Don't know why but codeplex system notified me about your reply of 31 Oct. as late as today, that is on 11 Nov. which is pity as I would have responded earlier.

As to the version of DNN, it obviously was a "slip of finger" since I meant 7.4.2.

Your conclusion on my using TurboScript was bull's eye - I used "TurboDNN099g".
Just applied Sebastian's TurboScripts "DNN099m" and now everything in By Invitation module works great.

Thanks for your assistance and insight.

Thanks again.

Greg_Greensky wrote Nov 11, 2015 at 2:47 PM

Gotta take back my statement that everything works OK with By Invitation module now.

When setting up the invitation the drop-down list doesn't display all the roles in my portal, the page where the module is place takes a long time to load and the logs show error about a ProfileBase view as below:
2015-11-11 06:16:58,854 [ANEMONE][Thread:31][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'dbo.vw_ProfileBase'.
Could not use view or function 'dbo.vw_Profile' because of binding errors.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at DotNetNuke.Data.PetaPoco.PetaPocoExt.ExecuteReader(Database database, String sql, Object[] args)
   at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteReader(String connectionString, CommandType type, Int32 timeout, String sql, Object[] args)
   at DotNetNuke.Data.SqlDataProvider.ExecuteReader(String procedureName, Object[] commandParameters)
   at DotNetNuke.Data.DataProvider.GetAvailableUsersForIndex(Int32 portalId, DateTime startDate, Int32 startUserId, Int32 numberOfUsers)
   at DotNetNuke.Services.Search.UserIndexer.FindModifiedUsers(Int32 portalId, DateTime startDateLocal, IDictionary`2 searchDocuments, IList`1 profileDefinitions, IList`1& indexedUsers, Int32& startUserId)
   at DotNetNuke.Services.Search.UserIndexer.IndexSearchDocuments(Int32 portalId, Int32 scheduleId, DateTime startDateLocal, Action`1 indexer)
ClientConnectionId:15188552-86b0-4c8a-9969-f5d1eaaaa7d2
Error Number:208,State:1,Class:16
Additional question is: where should the By Invitation Processor module be placed? Could it be the same page where the main By Invitation module is or it doesn't matter at all?

imagemaker wrote Nov 13, 2015 at 5:11 PM

The error you posted from the DNN event log is not related to the By Invitation module but is being generated by the DNN search scheduled job each time it tries to index the portal uses. It appears that the SQL server view dbo.vw_ProfileBase is either missing or corrupted. Since I don't find that view in a standard DNN 7.4.2 installation, I'm guessing this issue may be related to the use of DNN TurboScripts.

As for the other issues . . .
  1. If you have created additional roles since the By Invitation module was first installed, those new rolls will not show up in the drop-down when creating an invitation because they have not been enabled in the module's settings for the particular user role that is creating the invitation. Go into the By Invitation Settings and open the Role Based Limits section. There you can edit for each role that is allowed to create invitations which roles can be assigned to the invited user account. Check the appropriate boxes beside each role you wish to be assignable.
  2. I'm not sure why the page on which the By Invitation module was placed is loading slowly. You might try clearing the event log then immediately browse to the By Invitation module page then checking if any new errors are logged at that time.
  3. You should not manually place the By Invitation module on any page. When the By Invitation module is first added to a page, it automatically creates a hidden page on the site and places the By Invitation Processor module on that page. Each time the main By Invitation module is loaded, it checks if the hidden page and its By Invitation Processor module already exists - if not, it recreates them. There should be one and only one By Invitation Processor page/module on a site. The By Invitation Processor module should NOT be placed on the same page as the main By Invitation module as the page containing the By Invitation Processor module should be both hidden and viewable by anonymous users (when they click on the link in the emailed invitation).
Hope this helps . . . let me know if I can be of further assistance.

Greg_Greensky wrote Nov 13, 2015 at 9:23 PM

Thanks for your comments.

As per 1: I did as you recommended and all roles are visible now.

As per 2: No errors which could be related to the By Invitation module are present in the Event Viewer (actually none at all) or the Logs. Nevertheless, the page loads painfully long. Will have to keep an eye on that.

As per 3: understood and complied.

Will report back if anything changes.

Thanks William.

Greg_Greensky wrote Nov 14, 2015 at 8:06 AM

One more thing I observed just now.

When installing the By Invitation module 1.0.3.1 over the same version the system doesn't ask me for approval to do the repair install but shows no such warning. It treats the installation as a new one.

Strange.

Greg_Greensky wrote Nov 15, 2015 at 8:57 AM

William,

The page long loading time is due to Captcha control present on the page. As soon I removed it from the By Invitation Settings the page load time decreased substantially.

Greg_Greensky wrote Nov 15, 2015 at 5:24 PM

Additionally, before removing the Captcha from the page, every time I entered the Captcha text into the text box it showed the "Invalid Captcha text entered" message.

Think I read somewhere in the DNN resources that the Captcha control is not to be relied upon anymore.

imagemaker wrote Nov 15, 2015 at 7:46 PM

Good catch on finding the reason for the slow page load! I had to remove the DNN captcha control from the registration page of a DNN 7.4.1 site just the other day because no one could register as entry of the correct captcha text would always give the "Invalid Captcha/Security Code" message. It had been working fine on DNN 7.4.0 before upgrading to 7.4.1. I'll be updating that site to 7.4.2 later this week but I searched the DNN support tracker but did not find any related issues logged recently - only several from DNN 6.x which were marked Closed - Could not Reproduce. I had read that DNN was going to break the Captcha control out of the core as a provider so that other Captcha controls (Google reCaptcha in particular) could be used.

Greg_Greensky wrote Nov 16, 2015 at 6:15 AM

Sure, we can use reCaptcha, but what I did on my sites is a challenge composed of a simple maths question posed to a person registering on the site which is a simple User Profile Item set up.

Despite the solution is static I don't have any problems with spam/bot attacks.

Wouldn't be a nice solution to the By Invitation module instead of Captcha?

BTW, the more I delve in the By Invitation module, the more features I discover. That was an enormous piece of work and time invested, William. Just like your other module I use on one of my sites - Content Dejour. Thanks for them!

PS. You can mark this issue as solved.