Install Error

May 24, 2014 at 3:00 AM
I ran into an issue where I wasn't able to add a new Content Type after installing 06.00.07. I completely uninstalled the module and then reinstalled, but now I'm getting a SQL error when installing. I'm not sure what to do to get this to work. Any ideas? Attach is the error, the error is pretty long. Here's part of the error

Executing 02.00.00.SqlDataProvider
Info Start Sql execution: 02.00.00.SqlDataProvider file
Failure SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'IsCurrent'. at System.Data.SqlClient.SqlConnection.OnError(SqlException
Coordinator
May 24, 2014 at 2:12 PM
Hi JSlaughter

I'm guessing something went wrong either removing the tables in SQL or when adding them - but not sure how. Could you try this checklist and try to re-install after that? Pls give a quick feedback if it all worked.

Thanks,
iJungleboy
May 24, 2014 at 4:09 PM
I uninstalled the module from the Extensions page, and I ran the script from the checklist, and got the following error

Could not drop object 'dbo.ToSIC_EAV_Entities' because it is referenced by a FOREIGN KEY constraint.
Coordinator
May 24, 2014 at 4:31 PM
Ok, thanks for the feedback and sorry for the inconvenience.

Seems that you have some tables that are referencing each other and were not removed in the right order. We'll check this on Monday and answer asap.

Could you send us a screenshot of your SQL-Tables to daniel dot mettler at 2sic dot com?

Thanks,
iJungleboy
Developer
May 26, 2014 at 8:41 AM
Hi jslaughter

The SQL script in the checklist was outdated. I updated the checklist for v6, please try running it again: http://swisschecklist.com/en/r22bm8tg/Remove-the-2Sexy-Content-Module-completely.

Raphael
May 26, 2014 at 1:27 PM
I tried running the updated script and got a few errors still.

System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.ToSIC_EAV_Entities' because it is referenced by a FOREIGN KEY constraint.
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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:82a903ec-d580-4aa4-971b-de31924ce3c6

DROP TABLE [dbo].[ToSIC_EAV_Entities]

System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.ToSIC_EAV_Attributes' because it is referenced by a FOREIGN KEY constraint.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource
1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:3ceca05c-897c-4528-a9f1-6887f55faf30

DROP TABLE [dbo].[ToSIC_EAV_Attributes]

System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.ToSIC_EAV_AttributeTypes' because it is referenced by a FOREIGN KEY constraint.
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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:00a3d42f-022e-4dc9-9b24-05ae0996e384

DROP TABLE [dbo].[ToSIC_EAV_AttributeTypes]

System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.ToSIC_EAV_AttributeSets' because it is referenced by a FOREIGN KEY constraint.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource
1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:c9811377-3d8f-483d-b3ed-ba51062ab445

DROP TABLE [dbo].[ToSIC_EAV_AttributeSets]

System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.ToSIC_EAV_AssignmentObjectTypes' because it is referenced by a FOREIGN KEY constraint.
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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:d9586c1d-ebc9-4d63-bd63-fb30802ca667

DROP TABLE [dbo].[ToSIC_EAV_AssignmentObjectTypes]

System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.ToSIC_EAV_Apps' because it is referenced by a FOREIGN KEY constraint.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource
1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:4b3cc4ec-b6ad-4344-8a66-c075587f8a6f

DROP TABLE [dbo].[ToSIC_EAV_Apps]

System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.ToSIC_EAV_Zones' because it is referenced by a FOREIGN KEY constraint.
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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script)
ClientConnectionId:c97a106e-aa5c-4078-8320-4bdc9084e668

DROP TABLE [dbo].[ToSIC_EAV_Zones]

System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.ToSIC_EAV_ChangeLog' because it is referenced by a FOREIGN KEY constraint.
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& da
Developer
May 27, 2014 at 6:47 AM
Ok it seems like you ran the script inside DNN on the Host > SQL page. DNN does not support the GO syntax used in the script.

I re-wrote it, please try this:
BEGIN TRANSACTION SexyContentUninstaller

-- Remove Tables

EXEC('DROP TABLE [dbo].[ToSIC_EAV_EntityRelationships]')

EXEC('DROP TABLE [dbo].[ToSIC_SexyContent_ContentGroupItems]')

EXEC('DROP TABLE [dbo].[ToSIC_SexyContent_Templates]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_ValuesDimensions]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Dimensions]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Values]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Entities]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_DataTimeline]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AttributesInSets]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Attributes]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AttributeTypes]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AttributeGroups]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AttributeSets]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Attachments]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AssignmentObjectTypes]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Apps]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Zones]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_ChangeLog]')


-- Remove Stored Procedures

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_DeleteApp]')

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogAdd]')

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogSet]')

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_LogToTimeline]')


-- Remove PortalSettings

DELETE FROM PortalSettings
WHERE (SettingName = N'ToSIC_SexyContent_ZoneID')

COMMIT TRANSACTION SexyContentUninstaller
--ROLLBACK TRANSACTION SexyContentUninstaller
Coordinator
May 27, 2014 at 10:39 PM
Issue solved.
Aug 10, 2014 at 9:02 PM
I have had the same issues: Using 2SexyContent 6.1.5 - the latest I believe, on a DNN installation 7.3.1.

I've been messing around with this neat looking module, and am keen to see what more I can do with it, I've done stuff to the sample templates, and messed them up, so thought I would remove the modules from all pages, uninstall from the site, and re-install. I ran into the same issues as noted in this thread. I followed the suggestions above about removing the tables, SPs & record in PortalSettings table.

Then I re-installed. I've done the uninstall / reinstall process a couple of times, double checking everything.

This is the installation log:
Info Start Sql execution: 05.05.03.SqlDataProvider file
Failure SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'ToSIC_EAV_DeleteApp' in the database. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at ....

Can't post the whole error.

Any Suggestions?
Aug 12, 2014 at 10:46 AM
sounds like a stored procedure "DeleteApp" still exists. Maybe an uninstall problem. after uninstalling, manually review if anything called ToSIC* is still in the DB (tables, stored procedures).
hope it helps, pls give feedback.
Marked as answer by 2sicDev on 8/22/2014 at 8:16 AM
Sep 22, 2014 at 10:34 AM
Hi, I have had the same problem: with 2SexyContent 6.3.3 - I'm using DNN 07.03.02
After deleting the module, can not intall again!

"Cannot drop the procedure 'dbo.ToSIC_EAV_DeleteApp', because it does not exist or you do not have permission."

BEGIN TRANSACTION SexyContentUninstaller

-- Remove Tables

EXEC('DROP TABLE [dbo].[ToSIC_EAV_EntityRelationships]')

EXEC('DROP TABLE [dbo].[ToSIC_SexyContent_ContentGroupItems]')

EXEC('DROP TABLE [dbo].[ToSIC_SexyContent_Templates]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_ValuesDimensions]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Dimensions]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Values]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Entities]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_DataTimeline]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AttributesInSets]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Attributes]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AttributeTypes]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AttributeGroups]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AttributeSets]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Attachments]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_AssignmentObjectTypes]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Apps]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_Zones]')

EXEC('DROP TABLE [dbo].[ToSIC_EAV_ChangeLog]')


-- Remove Stored Procedures

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_DeleteApp]')

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogAdd]')

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogSet]')

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_LogToTimeline]')


-- Remove PortalSettings

DELETE FROM PortalSettings
WHERE (SettingName = N'ToSIC_SexyContent_ZoneID')

COMMIT TRANSACTION SexyContentUninstaller
--ROLLBACK TRANSACTION SexyContentUninstaller


Any Suggestions?
Coordinator
Sep 22, 2014 at 12:17 PM
no problem.

Just run the remaining lines after that, like
EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogAdd]') 

 EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogSet]') 

 EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_LogToTimeline]') 


 -- Remove PortalSettings 

 DELETE FROM PortalSettings 
 WHERE (SettingName = N'ToSIC_SexyContent_ZoneID') 

 COMMIT TRANSACTION SexyContentUninstaller 
 --ROLLBACK TRANSACTION SexyContentUninstaller 
and it should all work.
Sep 22, 2014 at 2:46 PM
Thanks for your quick response, but however it's still not working!

Cannot drop the procedure 'dbo.ToSIC_EAV_ChangeLogAdd', because it does not exist or you do not have permission.
Cannot drop the procedure 'dbo.ToSIC_EAV_ChangeLogSet', because it does not exist or you do not have permission.
Cannot drop the procedure 'dbo.ToSIC_EAV_LogToTimeline', because it does not exist or you do not have permission.
The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogAdd]')

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogSet]')

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_LogToTimeline]')


-- Remove PortalSettings

DELETE FROM PortalSettings
WHERE (SettingName = N'ToSIC_SexyContent_ZoneID')

COMMIT TRANSACTION SexyContentUninstaller
--ROLLBACK TRANSACTION SexyContentUninstaller
Coordinator
Sep 22, 2014 at 4:14 PM
Ok, I'll assume you're not very experienced with SQL yet. Please do this:
EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogAdd]') 
Go

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_ChangeLogSet]') 
Go

EXEC('DROP PROCEDURE [dbo].[ToSIC_EAV_LogToTimeline]') 
Go


 -- Remove PortalSettings 

 DELETE FROM PortalSettings 
 WHERE (SettingName = N'ToSIC_SexyContent_ZoneID') 
Go
you may still get errors, but that's because it's trying to delete something that's already deleted. After this, you should be able to install again.
Best, Daniel
Sep 23, 2014 at 1:53 PM
SQL uitvoer leverde de volgende uitzonderingen op: System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'ToSIC_EAV_DeleteApp' in the database. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script) ClientConnectionId:865764cd-f848-444d-8d8b-735252138142 -- make sure sql rolls back automatically in case of error. SET XACT_ABORT ON BEGIN TRANSACTION SexyContentUpdate; EXEC ToSIC_EAV_ChangeLogAdd 'System' DECLARE @ChangeLogID int IF SERVERPROPERTY('edition') <> 'SQL Azure' SET @ChangeLogID = CONVERT(int,CONVERT(varbinary(4),CONTEXT_INFO())) ELSE SET @ChangeLogID = 1 SELECT @ChangeLogID -- Create new AssignmentObjectType for Apps UPDATE ToSIC_EAV_AssignmentObjectTypes SET Name = N'App', Description = N'App' WHERE (AssignmentObjectTypeID = 3) -- Get App ContentType (which should not exists yet) DECLARE @AppAttributeSetID int SELECT @AppAttributeSetID = AttributeSetID FROM ToSIC_EAV_AttributeSets WHERE StaticName = '2SexyContent-App' AND AppID = 1 -- Create new AttributeSet for Apps (if it does not exist yet) IF @AppAttributeSetID IS NULL BEGIN INSERT INTO ToSIC_EAV_AttributeSets (StaticName, Name, Scope, Description, ChangeLogCreated, ChangeLogDeleted, AppID, UsesConfigurationOfAttributeSet, AlwaysShareConfiguration) VALUES (N'2SexyContent-App', N'2SexyContent-App', N'2SexyContent-App', N'Describes a 2SexyContent app', @ChangeLogID, NULL, 1, NULL, 1) SELECT @AppAttributeSetID = AttributeSetID FROM ToSIC_EAV_AttributeSets WHERE StaticName = '2SexyContent-App' AND Scope = N'2SexyContent-App' DECLARE @AttributeID int -- Insert Attribute DisplayName INSERT INTO ToSIC_EAV_Attributes (StaticName, [Type], ChangeLogCreated) VALUES ('DisplayName', 'String', @ChangeLogID) SET @AttributeID = SCOPE_IDENTITY() INSERT INTO ToSIC_EAV_AttributesInSets (AttributeSetID, AttributeID, IsTitle, SortOrder, AttributeGroupID) VALUES (@AppAttributeSetID, @AttributeID, 1, 0, 1) -- Insert Attribute Description INSERT INTO ToSIC_EAV_Attributes (StaticName, [Type], ChangeLogCreated) VALUES ('Description', 'String', @ChangeLogID) SET @AttributeID = SCOPE_IDENTITY() INSERT INTO ToSIC_EAV_AttributesInSets (AttributeSetID, AttributeID, IsTitle, SortOrder, AttributeGroupID) VALUES (@AppAttributeSetID, @AttributeID, 0, 1, 1) -- Insert Attribute Version INSERT INTO ToSIC_EAV_Attributes (StaticName, [Type], ChangeLogCreated) VALUES ('Version', 'String', @ChangeLogID) SET @AttributeID = SCOPE_IDENTITY() INSERT INTO ToSIC_EAV_AttributesInSets (AttributeSetID, AttributeID, IsTitle, SortOrder, AttributeGroupID) VALUES (@AppAttributeSetID, @AttributeID, 0, 2, 1) -- Insert Attribute Folder INSERT INTO ToSIC_EAV_Attributes (StaticName, [Type], ChangeLogCreated) VALUES ('Folder', 'String', @ChangeLogID) SET @AttributeID = SCOPE_IDENTITY() INSERT INTO ToSIC_EAV_AttributesInSets (AttributeSetID, AttributeID, IsTitle, SortOrder, AttributeGroupID) VALUES (@AppAttributeSetID, @AttributeID, 0, 3, 1) -- Insert Attribute AllowTokenTemplates INSERT INTO ToSIC_EAV_Attributes (StaticName, [Type], ChangeLogCreated) VALUES ('AllowTokenTemplates', 'Boolean', @ChangeLogID) SET @AttributeID = SCOPE_IDENTITY() INSERT INTO ToSIC_EAV_AttributesInSets (AttributeSetID, AttributeID, IsTitle, SortOrder, AttributeGroupID) VALUES (@AppAttributeSetID, @AttributeID, 0, 4, 1) -- Insert Attribute AllowRazorTemplates INSERT INTO ToSIC_EAV_Attributes (StaticName, [Type], ChangeLogCreated) VALUES ('AllowRazorTemplates', 'Boolean', @ChangeLogID) SET @AttributeID = SCOPE_IDENTITY() INSERT INTO ToSIC_EAV_AttributesInSets (AttributeSetID, AttributeID, IsTitle, SortOrder, AttributeGroupID) VALUES (@AppAttributeSetID, @AttributeID, 0, 5, 1) -- Insert Attribute Hidden INSERT INTO ToSIC_EAV_Attributes (StaticName, [Type], ChangeLogCreated) VALUES ('Hidden', 'Boolean', @ChangeLogID) SET @AttributeID = SCOPE_IDENTITY() INSERT INTO ToSIC_EAV_AttributesInSets (AttributeSetID, AttributeID, IsTitle, SortOrder, AttributeGroupID) VALUES (@AppAttributeSetID, @AttributeID, 0, 6, 1) -- Make sure every existing app has this attributeset (ghost / shared-attributeset) INSERT INTO ToSIC_EAV_AttributeSets (ChangeLogCreated, StaticName, Name, Scope, Description, AppID, UsesConfigurationOfAttributeSet) SELECT @ChangeLogID, DestinationAttributeSets.StaticName, DestinationAttributeSets.Name, DestinationAttributeSets.Scope, DestinationAttributeSets.Description, DestinationAttributeSets.AppID, DestinationAttributeSets.AttributeSetID AS UsesConfigurationOfAttributeSet FROM (SELECT ToSIC_EAV_AttributeSets_1.AttributeSetID, ToSIC_EAV_AttributeSets_1.StaticName, ToSIC_EAV_AttributeSets_1.Name, ToSIC_EAV_AttributeSets_1.Scope, ToSIC_EAV_AttributeSets_1.Description, ToSIC_EAV_Apps.AppID FROM ToSIC_EAV_AttributeSets AS ToSIC_EAV_AttributeSets_1 INNER JOIN ToSIC_EAV_Apps ON ToSIC_EAV_AttributeSets_1.AppID <> ToSIC_EAV_Apps.AppID WHERE (ToSIC_EAV_AttributeSets_1.AlwaysShareConfiguration = 1) AND (ToSIC_EAV_AttributeSets_1.AppID = 1)) AS DestinationAttributeSets LEFT OUTER JOIN ToSIC_EAV_AttributeSets AS ExistingAttributeSets ON DestinationAttributeSets.AppID = ExistingAttributeSets.AppID AND DestinationAttributeSets.StaticName = ExistingAttributeSets.StaticName WHERE (ExistingAttributeSets.AttributeSetID IS NULL) END -- Wrapped into an EXEC because Create Procedure has to be the first statement in a query batch EXEC(N' -- ============================================= -- Author: Benjamin Gemperle -- Create date: 2014-02-26 -- Description: Delete an App in the 2sic EAV System -- ============================================= CREATE PROCEDURE ToSIC_EAV_DeleteApp @AppId int AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Delete Value-Dimensions DELETE FROM ToSIC_EAV_ValuesDimensions FROM ToSIC_EAV_Values INNER JOIN ToSIC_EAV_Entities ON ToSIC_EAV_Values.EntityID = ToSIC_EAV_Entities.EntityID INNER JOIN ToSIC_EAV_AttributeSets ON ToSIC_EAV_Entities.AttributeSetID = ToSIC_EAV_AttributeSets.AttributeSetID INNER JOIN ToSIC_EAV_ValuesDimensions ON ToSIC_EAV_Values.ValueID = ToSIC_EAV_ValuesDimensions.ValueID WHERE (ToSIC_EAV_AttributeSets.AppID = @AppID) -- Delete Values DELETE FROM ToSIC_EAV_Values FROM ToSIC_EAV_Values INNER JOIN ToSIC_EAV_Entities ON ToSIC_EAV_Values.EntityID = ToSIC_EAV_Entities.EntityID INNER JOIN ToSIC_EAV_AttributeSets ON ToSIC_EAV_Entities.AttributeSetID = ToSIC_EAV_AttributeSets.AttributeSetID WHERE (ToSIC_EAV_AttributeSets.AppID = @AppID) -- Delete Parent-EntityRelationships DELETE FROM ToSIC_EAV_EntityRelationships FROM ToSIC_EAV_Entities INNER JOIN ToSIC_EAV_AttributeSets ON ToSIC_EAV_Entities.AttributeSetID = ToSIC_EAV_AttributeSets.AttributeSetID INNER JOIN ToSIC_EAV_EntityRelationships ON ToSIC_EAV_Entities.EntityID = ToSIC_EAV_EntityRelationships.ParentEntityID WHERE (ToSIC_EAV_AttributeSets.AppID = @AppID) -- Delete Child-EntityRelationships DELETE FROM ToSIC_EAV_EntityRelationships FROM ToSIC_EAV_Entities INNER JOIN ToSIC_EAV_AttributeSets ON ToSIC_EAV_Entities.AttributeSetID = ToSIC_EAV_AttributeSets.AttributeSetID INNER JOIN ToSIC_EAV_EntityRelationships ON ToSIC_EAV_Entities.EntityID = ToSIC_EAV_EntityRelationships.ChildEntityID WHERE (ToSIC_EAV_AttributeSets.AppID = @AppID) -- Delete Entities DELETE FROM ToSIC_EAV_Entities FROM ToSIC_EAV_Entities INNER JOIN ToSIC_EAV_AttributeSets ON ToSIC_EAV_Entities.AttributeSetID = ToSIC_EAV_AttributeSets.AttributeSetID WHERE (ToSIC_EAV_AttributeSets.AppID = @AppId) -- Delete Attributes DELETE FROM ToSIC_EAV_Attributes FROM ToSIC_EAV_Attributes INNER JOIN ToSIC_EAV_AttributesInSets ON ToSIC_EAV_Attributes.AttributeID = ToSIC_EAV_AttributesInSets.AttributeID INNER JOIN ToSIC_EAV_AttributeSets ON ToSIC_EAV_AttributesInSets.AttributeSetID = ToSIC_EAV_AttributeSets.AttributeSetID WHERE (ToSIC_EAV_AttributeSets.AppID = @AppID) -- Delete Attributes not in use anywhere (Attribute not in any Set, no Values/Related Entities) DELETE FROM ToSIC_EAV_Attributes FROM ToSIC_EAV_Attributes LEFT OUTER JOIN ToSIC_EAV_AttributesInSets ON ToSIC_EAV_Attributes.AttributeID = ToSIC_EAV_AttributesInSets.AttributeID LEFT OUTER JOIN ToSIC_EAV_EntityRelationships ON ToSIC_EAV_Attributes.AttributeID = ToSIC_EAV_EntityRelationships.AttributeID LEFT OUTER JOIN ToSIC_EAV_Values ON ToSIC_EAV_Attributes.AttributeID = ToSIC_EAV_Values.AttributeID WHERE (ToSIC_EAV_Values.ValueID IS NULL) AND (ToSIC_EAV_EntityRelationships.AttributeID IS NULL) AND (ToSIC_EAV_AttributesInSets.AttributeID IS NULL) -- Delete Attribute-In-Sets DELETE FROM ToSIC_EAV_AttributesInSets FROM ToSIC_EAV_AttributeSets INNER JOIN ToSIC_EAV_AttributesInSets ON ToSIC_EAV_AttributeSets.AttributeSetID = ToSIC_EAV_AttributesInSets.AttributeSetID WHERE (ToSIC_EAV_AttributeSets.AppID = @AppId) -- Delete AttributeSets DELETE FROM ToSIC_EAV_AttributeSets WHERE AppID = @AppId -- Delete App DELETE FROM ToSIC_EAV_Apps WHERE AppID = @AppId END') -- Add a new template-app assignment ALTER TABLE dbo.ToSIC_SexyContent_Templates ADD AppID int NULL -- Assign all templates to an app EXEC('UPD
Coordinator
Sep 23, 2014 at 2:12 PM
Hi celiktas

I believe you're really stuck - but it's not a complex issue. Since the system says it can't add the method (because it apparently exists) but can't delete it (because it apparently doesn't exist) there must be something other that's wrong.

I would like to help, but I believe this is the wrong format. Could you briefly give us host-access to your system? please send me everything we need to info followed by you-know-what and then 2sic.org?

Daniel
Coordinator
Sep 23, 2014 at 4:10 PM
I looked at your tables and couldn't find anything.

Then I just ran a normal install and everything just worked. Not sure what you did - but I couldn't discover any problems.

Here's my recording of the installation: http://screencast.com/t/zePUJzjQWe
Sep 23, 2014 at 6:50 PM
Hello Daniel,

Thanks again, this was a new database the instalation in a new database is not a problem, when you delete de module and try to install again then you got the problem.
I think you must try to delete and then install again, you will see the problem!

Buy the way your recording (http://screencast.com/t/zePUJzjQWe) is perfect!
Coordinator
Sep 24, 2014 at 7:29 AM
Edited Sep 24, 2014 at 7:34 AM
Hi @celiktas

Thanks - I tried it and - you're right! Something does break, and it appears that the un-install doesn't do its job properly.

I recorded it here http://www.screencast.com/t/leiGhvwRuL4

It actually looks like the problem is different - because that one stored procedure (see screenshot in the issue https://github.com/2sic/2SexyContent/issues/59) has a different schema called democam (everything else has dbo). This is probably a installation mistake...

We'll look at it internally ASAP...

Created an issue here: https://github.com/2sic/2SexyContent/issues/59

Here's the quick fix - run this in the sql
Drop Procedure democam.ToSIC_EAV_DeleteApp
Drop procedure dbo.ToSIC_EAV_ChangeLogAdd
Drop procedure dbo.ToSIC_EAV_ChangeLogSet
Drop procedure dbo.ToSIC_EAV_LogToTimeline
Note: in case you have already re-installed the module (and it half-installed), the entire clean-up process is
  1. Unistall both the 2sxc App and 2sxc Content
  2. Run the long sql-script above (the one Raphael gave you)
  3. Run my helper script - maybe replace "democam" with whatever the schema-name is in your system
Stay sexy!
Daniel
Sep 24, 2014 at 11:03 AM
Hello Daniel,

thank you the reinstall problem is solved, but now i have found second problem!After reinstall the module 2sxc and try to auto configure everything gives the second problem!
  1. Something went wrong while installing 'QR Code': Internal Server Error
  2. Something went wrong while installing 'TimelineJS': Internal Server Error
  3. Something went wrong while installing 'FAQ with Categories and 6 views': Internal Server Error
I will do my best to stay sexy! :)

Mert Celiktas
Coordinator
Sep 24, 2014 at 2:11 PM
@Celiktas

I looked at the event-viewer http://democam.greenparkinternational.nl/en-us/Host/Extensions/portalid/0

It said the folder already existed. Apparently the apps had been installed (creating a folder like /Portals/0/2sxc/App/FAQ etc.) and then when the module was removed, these do not get removed.

I tried deleting the folders but got an error, so I just renamed them.

Try again :)
Sep 24, 2014 at 2:41 PM
Hi Daniel,

the problem is solved, thanks again!

Celiktas