+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Instance Corrupted, trouble restoring

Instance Corrupted, trouble restoring

15 posts, 0 answered
  1. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    26 May 2010
    Link to this post
    I have an instance of 3.2 that has been running for a while.  There was an error happening with the events section so I backed up everything and attempted to upgrade following the instructions.  It failed. 

    After I restored the files & database there was an error on the CmsContentBase table, where it was looking for two columns (StreamingContentProvider & Creator)
    I created both as varchar fields.  The site comes back up however, I cannot edit/save anything in Sitefinity, it errors with a NullReferenceException.

    I need a way to get the installation restored to a completely working state.  There was nothing in the documentation or help files.

    Thanks.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    26 May 2010
    Link to this post
    Hi Dave,

    Most probably you have not upgraded the project correctly or somehow the upgrade has failed. StreamingContentProvider has been implemented since Sitefinity 3.7. Below is the table structure that you could compare with yours

    SET ANSI_NULLS ON
    GO
     
    SET QUOTED_IDENTIFIER ON
    GO
     
    CREATE TABLE [dbo].[sf_CmsContentBase](
        [Application] [nvarchar](50) NOT NULL,
        [ID] [uniqueidentifier] NOT NULL,
        [MimeType] [nvarchar](150) NULL,
        [StreamingProviderName] [nvarchar](150) NULL,
        [ParentID] [uniqueidentifier] NULL,
        [Url] [nvarchar](256) NULL,
        [LoweredUrl] [nvarchar](256) NULL,
        [CommentsCount] [int] NULL,
        [ItemInfo] [nvarchar](512) NULL,
        [Creator] [nvarchar](50) NULL,
     CONSTRAINT [PK_sf_CmsContentBase] PRIMARY KEY CLUSTERED
    (
        [Application] ASC,
        [ID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
     
    GO
     
    ALTER TABLE [dbo].[sf_CmsContentBase] ADD  DEFAULT ('') FOR [Application]
    GO
     
    ALTER TABLE [dbo].[sf_CmsContentBase] ADD  DEFAULT (newid()) FOR [ID]
    GO

    Anyway I suggest that you should start from the very beginning, because it looks like there are some problems with the database at your end. NullReferenceException is thrown when some method parameter is null and it could not be processed by our code or you are trying to insert null value for a database filed where null is not allowed.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    26 May 2010
    Link to this post
    Thanks Ivan!  What you said goes right in light with what happened, the install stalled and ended up corrupting the database in the process.

    If I read what you suggested correctly, you think I should create a fresh 3.2 database and then import data from the existing database?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    26 May 2010
    Link to this post
    Hi Dave,

    You could try upgrade the project once again. First you could try to path it to 3.7 SP2. Then upgrade it to 3.7 SP3. By default the database is upgraded internally and there should not be a problem with the tables, so the issue could be somewhere else. Also there is no column called StreamingContentProvider in sf_CmsContentBase. The columns are


    •     [Application]
    •     [ID]
    •     [MimeType]
    •     [StreamingProviderName]
    •     [ParentID]
    •     [Url]
    •     [LoweredUrl]
    •     [CommentsCount]
    •     [ItemInfo]
    •     [Creator]


    If there are still problems let me know.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    04 Jun 2010
    Link to this post

    I am getting the following error right now:

    Parameter '?P_StreamingProviderName' not found in the collection.

    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.ArgumentException: Parameter '?P_StreamingProviderName' not found in the collection.
    [ArgumentException: Parameter '?P_StreamingProviderName' not found in the collection.]
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.EndStatement(SQLCommandEventArgs args, DataRow row) +503
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecCommandProcedure(StmtContext context, DataRow data) +712
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecuteCommand(StmtContext context, DataRow data) +76
       Nolics.ORMapper.DataProviders.SQLDataProvider.Update(DataSet updateData) +466
       Nolics.ORMapper.Base.Transaction.Commit(Boolean fCleanIfSuccess) +908
       Nolics.ORMapper.Base.Transaction.Commit() +10
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.SaveContent(IContent content, Boolean fireEvents) +238
       Telerik.Cms.Engine.ContentProviderBase.SaveContent(IContent content) +12
       Telerik.Cms.Engine.ContentManager.SavedStagedContent(StagedContent staged, ContentStatus status) +257
       Telerik.Cms.Engine.ContentManager.SaveContent(IContent content, ContentStatus status) +296
       Telerik.Cms.Engine.WebControls.Admin.ControlPanel.button_Command(Object sender, CommandEventArgs e) +2187
       Telerik.Events.WebControls.Admin.ControlPanel.button_Command(Object sender, CommandEventArgs e) +616
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +108
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


    I added the parameter to sf_CmsContentBase_ins but it did not resolve it. 

    Essentially, I'm in a state where my backup is corrupted.

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    04 Jun 2010
    Link to this post
    Hi Dave,

    Most probably you have upgraded the website to Sitefinity 3.7 SP3. Then you have made a request to the same database from a website that uses different version - say 3.2 ( it could be each version prior 3.7 SP3). This has downgraded the database. Afterwords, you have made request from the website that uses Sitefinity 3.7 SP3 dlls and you are getting the errors because of the downgrade.

    Please make sure that you do not have two websites with different versions that points to the same database. You could also check the SchemaVersion value in the tables below. The value should be set the the project version. You will find list with all versions here.

    • [sf_CmsVariables]
    • [sf_frm_Variables]
    • [sf_GC_Variables]
    • [sf_LocVariables]
    • [sf_Notif_Variables]
    • [sf_Polls_Variables]
    • [sf_Search_Variables]
    • [sf_VersVariables] 

    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    04 Jun 2010
    Link to this post
    Ivan,
    This is most likely the case, since the updgrade *failed* and the backup is not restoring properly. 

    Would it be possible to get a MySQL script that will create all of the procedures for 3.2?  That way I can drop them all and then recreate with the script?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    06 Jun 2010
    Link to this post
    Hello Dave,

    We use datalayer - Nolics that creates all tables and stored procedures.

    You can export all stored procedures from a clean installation by using --routines command.

    mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt <database> > storesproceduresback.sql

    Then import the procedures to another database.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  9. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    08 Jun 2010
    Link to this post
    So I am attempting to repair the instance on my local environment:
    -Windows 7
    -MySQL on a remote machine

    After installing 3.7, I could not create projects using the wizard - it said the logged in user did not have permissions to create the virtual directory.  Which is false.

    So I used the blank project, as the documentation indicated however, when I attempt to connect to the MySQL database I get the following exception:
    There was an error trying to connect to the Database Server:
    Could not load file or assembly 'MySql.Data, Version=5.0.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

    This is a clean install, not sure I should be getting that error.
  10. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    08 Jun 2010
    Link to this post
    Also, the closest released version of the MySQL connector is 5.0.9.  The one that comes with Sitefinity (the version I have) is 6.0.6.

    Either way something is not right.
  11. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    08 Jun 2010
    Link to this post
    I was able to get around this issue by adding the assembly redirect:

    <

     

     

    dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">

     

    <

     

     

    assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />

     

    <

     

     

    bindingRedirect oldVersion="1.0.0.0-6.0.2.0" newVersion="6.0.3.0" />

     

    </

     

     

    dependentAssembly>

     

  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Jun 2010
    Link to this post
    Hello Dave,

    This is a known issue in 3.7, but the problem should be exist in Sitefinity SP3. I attached the correct version of MySqlData that you can use instead of  making bindingRedirect.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  13. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    08 Jun 2010
    Link to this post
    Thanks.  The original issue is still not fixed yet.  I had everything working but was having db issues at my ISP.

    I am attempting to do the following:
    - Install a fresh 3.7 instance on my local environment.
    - Import data from my 3.5 instance to my 3.7 environment.
    - Copy the 3.5 files over the top of the 3.7 files, excluding the Sitefinity and bin directories

    Then hopefully everything works.
  14. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
  15. Dave
    Dave avatar
    10 posts
    Registered:
    11 Aug 2009
    14 Jun 2010
    Link to this post
    Hello, I am still stuck on this and could use some help.

    Thanks.
Register for webinar
15 posts, 0 answered