Copied to clipboard

Flag this post as spam?

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


  • Eidos 44 posts 66 karma points
    Sep 09, 2015 @ 13:49
    Eidos
    0

    Upgrade from 1.8.3 to 1.11

    Today I upgraded merchello from 1.8.3 to 1.11:
    Firstly, I upgraded umbraco (nuget).
    After that I replaced all the dll, I replaced all App_Plugins\Merchello files (the merchello.config files were merged).
    Now, in the backoffice, I'm not able to open the merchello areas, because of server returns the following errors:

    Received an error from the server
    Failed to search products
    
    Object reference not set to an instance of an object.
    Exception Details:
    System.NullReferenceException: Object reference not set to an instance of an object.
    Stacktrace:
    
    at Merchello.Web.WebApi.JsonCamelCaseFormatter.OnActionExecuted(HttpActionExecutedContext httpActionExecutedContext)
    
       at System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecuted(HttpActionContext actionContext, HttpResponseMessage response, Exception exception)
    
       at System.Web.Http.Filters.ActionFilterAttribute.<>c__DisplayClass2.<System.Web.Http.Filters.IActionFilter.ExecuteActionFilterAsync>b__1(CatchInfo`1 info)
    
       at System.Threading.Tasks.TaskHelpersExtensions.<>c__DisplayClass4`1.<Catch>b__3()
    
       at System.Threading.Tasks.TaskHelpersExtensions.CatchImpl[TResult](Task task, Func`1 continuation, CancellationToken cancellationToken)
    

    do I upgrade merchello in a bad way?
    Is there a way to resolve these problems?
    Thanks!

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 09, 2015 @ 14:36
    Rusty Swayne
    0

    @Eidos

    It sounds like you've moved all the files correctly, so we'll need to figure out which object reference is null to give us a hint as to where in the upgrade process things are hanging.

    Make sure your debug value in the web.config is set to true, so we are certain we are not chasing something related to ClientDependency. Also, if you're using Chrome, open the developer tools and click the setting 'Disable cache (while DevTools is open)' - these probably won't do anything for you, but it's a good base line.

    Then rebuild the Merchello examine indexes. Between 1.8.3 and 1.11.0 I've moved things around.

    If that does not work, we should look in the database and verify that newer stuff has been added.

    1.9.0

    new tables

    • merchOfferSettings
    • merchOfferRedeemed

    new value in merchTypeField: 'CustomerCredit'

    1.10.0

    new value in merchStoreSettings: 'globalTaxationApplication'

    new column on merchTaxMethod : 'productTaxMethod' bit

    1.11.0

    new tables

    • merchEntityCollection
    • merchCustomer2EntityCollection
    • merchInvoice2EntityCollection
    • merchProduct2EntityCollection

    new value in merchTypeField 'EntityCollection'

    Let me know how it goes.

  • Eidos 44 posts 66 karma points
    Sep 10, 2015 @ 14:45
    Eidos
    1

    Thanks Rusty!

    I found the problem: when I installed the umbraco upgrade, I replaced ExamineIndex.config and ExamineSettings.config, as a consequence they didn't contain any merchello index references.
    In addition, the merchEntityCollection table didn't contain some rows. I added them. ;)

    Now I notice some issues:
    1) I'm not able to capture payment in the backend (Cash Payment Provider) when the prices contain decimal values, it seems related to https://our.umbraco.org/projects/collaboration/merchello/merchello/66510-capturepayment-not-working-in-backend
    Future umbraco and merchello versions will use Examine >=v0.1.66 (no bug). Is it correct?

    2) when new shipping address of a customer is added, the indexes are not refreshed and the new address is not visible in the backend.
    I use the following code:

    CustomerAddress address = new CustomerAddress(customerKey);
    address.Label = "title";
    address.AddressType = AddressType.Shipping;
    address.FullName = "Name";
    address.Address1 = "Address";
    address.Locality = "Locality";
    address.Region = "Region";
    address.PostalCode = "Postal Code";
    address.CountryCode = "Country Code";
    address.IsDefault = true;
    MerchelloContext.Current.Services.CustomerService.Save(address);
    

    Is it correct?

    3) In the marketing area (/merchello/merchello/offerslist/manage), I'm not able to create new offer: when I push the new offer button, I don't see any request or error in the console.
    are there any settings? What could it be?
    However I'm able to insert a new offer using the left menu (right click over marketing->new offer).

    4) I would like to update the italian translation. I will pull it.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 11, 2015 @ 19:04
    Rusty Swayne
    0

    The decimal values are something that people have been trying to get sorted out. I even saw a pull request yesterday that I have not had a chance to review yet - https://github.com/Merchello/Merchello/pull/1442 - Dude's a rock star =)

    I thought I sorted the customer address issue ... but if your still seeing it, I'll reopen the issue - but your code does look correct. If you rebuild the Customer index in the back office does the address appear?

    The New button should not be on the offers list anymore, rather offers are now created via the context menu in the navigation. That was one of the things I did in 1.11.0.

    I really appreciate the localization effort. I've been working pretty hard on trying to get the files reorganized and get everything in the back office using the localization service. It's still a bit of work in progress - and there are some things that are hard coded in the actual class code that I need to change up ... but I'm getting there =)

  • Eidos 44 posts 66 karma points
    Sep 14, 2015 @ 09:45
    Eidos
    0

    @Rusty Thanks for you replay!

    I tried to update the ExtendedDataExtensions.cs class like the changes in the pull request but the problem remains.
    My merchello installation is affected from a decimal issue like this:
    https://github.com/Merchello/Merchello/issues/1352
    I understood that @Flavio found and resolved the problem in the examine (https://github.com/Shazwazza/Examine/pull/17) but Umbraco and Merchello doesn't use the Examine >=v.0.1.66
    Is it correct?

    About the Customer index, if I rebuild the index, the new address will appear in the back office. Seems that when new shipping address is added, the indexes are not refreshed.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 14, 2015 @ 18:54
    Rusty Swayne
    0

    @Eidos,

    I'll take a look at it again. In the meantime, you could try saving the address with the SaveCustomerAddress extension method off of ICustomer.

    so

    if (!CurrentCustomer.IsAnonymous) 
    {
          var customer = (ICustomer)CurrentCustomer;  
          // where address is the address you constructed.
          customer.SaveCustomerAddress(address, AddressType.Shipping);
    }
    
  • Eidos 44 posts 66 karma points
    Sep 17, 2015 @ 08:13
    Eidos
    0

    You are right: utilising your method, the indexes are updated. Only one explanation for others: SaveCustomerAddress accepts only the address parameter (not the AddressType).

    About some issues in the back office (get or update a product details and cash payment), for now seems to be corrected through Tryparse with InvariantCulture for the nullable decimal types (I pulled a request on github). However, further investigation will be performed! ;)

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 17, 2015 @ 13:19
    Rusty Swayne
    0

    Great news.

    The reason why the extension method worked is it is actually adding the address to the customer addresses collection and then saving the customer rather than directly saving the address .

  • Eidos 44 posts 66 karma points
    Sep 21, 2015 @ 06:37
    Eidos
    0

    Perfect...thanks!

Please Sign in or register to post replies

Write your reply to:

Draft