Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Neil Hodges 338 posts 987 karma points
    Mar 27, 2020 @ 15:42
    Neil Hodges
    0

    Duplicating/Carbon Copy of site, Payment Methods erroring

    Hi

    I've created a carbon copy of one of our Tea Commerce sites, copied the DB and all files. This site will be a sister site of the original.

    Everything works correctly as the main site it's copied from apart from the Payment Methods.

    When I open the Payment methods I get :

    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.]
       TeaCommerce.Umbraco.Application.Views.PaymentMethods.EditPaymentMethod.lvSettings_ItemDataBound(Object sender, ListViewItemEventArgs e) +501
       System.Web.UI.WebControls.ListView.OnItemDataBound(ListViewItemEventArgs e) +130
       System.Web.UI.WebControls.ListView.CreateItemsWithoutGroups(ListViewPagedDataSource dataSource, Boolean dataBinding, InsertItemPosition insertPosition, ArrayList keyArray) +1255
       System.Web.UI.WebControls.ListView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +1274
       System.Web.UI.WebControls.ListView.PerformDataBinding(IEnumerable data) +52
       System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +207
       System.Web.UI.WebControls.ListView.PerformSelect() +124
       TeaCommerce.Umbraco.Application.Views.PaymentMethods.EditPaymentMethod.LoadPaymentMethodSettings() +532
       TeaCommerce.Umbraco.Application.Views.PaymentMethods.EditPaymentMethod.OnLoad(EventArgs e) +739
       System.Web.UI.Control.LoadRecursive() +89
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1606
    

    Screenshot below:

    enter image description here

    Ive tried creating a new Payment Method, and it's still throwing the error.

    Log file just says the same:

    2020-03-27 15:31:47,073 [P41276/D7/T296] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    
    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at TeaCommerce.Umbraco.Application.Views.PaymentMethods.EditPaymentMethod.lvSettings_ItemDataBound(Object sender, ListViewItemEventArgs e)
       at System.Web.UI.WebControls.ListView.OnItemDataBound(ListViewItemEventArgs e)
       at System.Web.UI.WebControls.ListView.CreateItemsWithoutGroups(ListViewPagedDataSource dataSource, Boolean dataBinding, InsertItemPosition insertPosition, ArrayList keyArray)
       at System.Web.UI.WebControls.ListView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)
       at System.Web.UI.WebControls.ListView.PerformDataBinding(IEnumerable data)
       at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
       at System.Web.UI.WebControls.ListView.PerformSelect()
       at TeaCommerce.Umbraco.Application.Views.PaymentMethods.EditPaymentMethod.LoadPaymentMethodSettings()
       at TeaCommerce.Umbraco.Application.Views.PaymentMethods.EditPaymentMethod.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.app_plugins_teacommerce_views_paymentmethods_editpaymentmethod_aspx.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     2020-03-27 15:32:13,617 [P41276/D7/T144] INFO  umbraco.BusinessLogic.Log - Log scrubbed.  Removed all items older than 2020-03-26 15:32:13
    

    Any ideas?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 27, 2020 @ 17:03
    Matt Brailsford
    0

    Hmm, it looks like it's to do with the payment provider settings. You may need to double check the [TeaCommerce_PaymentMethodSetting] table was copied ok.

    Did you clone the DB? or duplicate it some other way? Is the sister site the same language etc? or has something changed between the two?

  • Neil Hodges 338 posts 987 karma points
    Mar 28, 2020 @ 08:57
    Neil Hodges
    0

    Yeh thought it could be the tables were not copied over, but looks to be there:

    enter image description here

    I just cloned the bacpac file, renamed it on import, all the tables seem to be there and they all have data in them.

    The sister sites the same language. It just has less products in it, they are focusing on one particular genre of product, so we removed images and products, and just left the ones that are needed.

    Do you think as the orders have been copied over, and some of the order contains links to deleted products it could cause it? like orphaning orders with a product?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 28, 2020 @ 09:21
    Matt Brailsford
    1

    I don't think so, the YSOD you posted shows it's having trouble binding the settings list to the ASP.NET list view, with something being null that it's not expecting to be

    Something in here is null that it's not expecting to be null https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/blob/master/Source/TeaCommerce.Umbraco.Application/Views/PaymentMethods/EditPaymentMethod.aspx.cs#L354

    It could be the setting itself that is missing, or possibly any one of the controls it's expecting to find. Are you sure all the teacommerce views have been copied over? Have you set your file permissions on the site?

    Matt

  • Neil Hodges 338 posts 987 karma points
    Mar 28, 2020 @ 11:14
    Neil Hodges
    100

    Hi

    So I checked everything I can and couldn't see any difference.

    I decided to re-install Tea Commerce (change the installpackages.config) and that seems to have fixed it, all the settings are showing up.

    I wonder if it has something to do with the licence set for the old site or some hash key that was set up to the old site?

    Anyhow, it's all working as should now :) as always thanks for your help Matt, much appreciated.

    Another TC website to Go Live Monday fingers crossed!

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 28, 2020 @ 13:19
    Matt Brailsford
    0

    Hmmm, that is a strange one, but glad you got it working 👍

    Next week is all about the project launches it seems 😉

Please Sign in or register to post replies

Write your reply to:

Draft