I've found a problem in the check out stage of Merchello / Fastrack (2.2.1). If the State / Province / Region field is left empty for countries where a list of possible values isn't included in the merchello.config file then I get the following error when trying to get to the ShipRateQuote page:
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:
Line 6: <!-- ShipRateQuote.cshtml -->
Line 7:
Line 8: @Html.Action("ShipRateQuoteForm", "CheckoutShipRateQuote", new { area = "FastTrack" })
So to fix this I either need to make the State / Province / Region required by adding it to the validation routine, or I need to modify the bit of code that is falling over if it finds the State / Province / Region field contains an empty string.
I can't work out how to do either of those things at the moment. Can anyone help?
Alternatively if I've misdiagnosed the problem any other suggestions would be helpful too ...
Yes - the error was fixed, but it may be we need to look at the validation again. The trick though is it is different for various people. e.g. in the US we always want the state (region) whereas in other places the region is optional.
I finally got around to upgrading to Merchello 2.3.0 and the upgrade seems to have broken Merchelo somehow. I now have the helpful error message:
The page cannot be displayed because an internal server error has occurred.
I'm now going to go through the process of working out what's broken, but I'd appreciate some advice on how I should upgrade Merchello, as I don't think the upgrade process has ever worked smoothly for me, so I'm obviously doing something wrong. My site had M2.2.1 and FT2.2.1. I haven't upgraded FastTrack - do I need to? What I've done is a local package install using the M2.3.0 zip file.
I now have another - this line of code in the Catalog view is raising an error:
var categories = Model.Categories != null ? Model.Categories.Children().ToArray() : Enumerable.Empty<ProductCollection>();
'IProductCollection' does not contain a definition for 'Children' ...
Am I missing another reference, or do I need to update FastTrack to 2.3.0? If so how do I do that without losing all the customisation I've done on the templates?
Merchello Billing / Postage Address State validation
Hi,
I've found a problem in the check out stage of Merchello / Fastrack (2.2.1). If the State / Province / Region field is left empty for countries where a list of possible values isn't included in the merchello.config file then I get the following error when trying to get to the ShipRateQuote page:
So to fix this I either need to make the State / Province / Region required by adding it to the validation routine, or I need to modify the bit of code that is falling over if it finds the State / Province / Region field contains an empty string.
I can't work out how to do either of those things at the moment. Can anyone help?
Alternatively if I've misdiagnosed the problem any other suggestions would be helpful too ...
Cheers,
Crac
I think this issue was fixed in v2.3.0
http://issues.merchello.com/youtrack/issue/M-1104
I also posted some sample code on there that I had to use to work around it but its not specific to FastTrack but may help you.
Yes - the error was fixed, but it may be we need to look at the validation again. The trick though is it is different for various people. e.g. in the US we always want the state (region) whereas in other places the region is optional.
Hi,
I finally got around to upgrading to Merchello 2.3.0 and the upgrade seems to have broken Merchelo somehow. I now have the helpful error message:
The page cannot be displayed because an internal server error has occurred.
I'm now going to go through the process of working out what's broken, but I'd appreciate some advice on how I should upgrade Merchello, as I don't think the upgrade process has ever worked smoothly for me, so I'm obviously doing something wrong. My site had M2.2.1 and FT2.2.1. I haven't upgraded FastTrack - do I need to? What I've done is a local package install using the M2.3.0 zip file.
Cheers,
Crac
OK, so a bit more digging ... it appears the MerchelloHelper object doesn't expose the TypedProductContent function any more.
So my question now is how do I fix this and is theer a list of the other things I need to fix in my views before M2.3.0 will run?
Cheers,
Crac
I still haven't found a solution to this. Does anyone have any suggestions?
Cheers,
Crac
Hey Caractacus,
I missed adding the TypedProductContent change as a breaking change - It was moved to an extension method.
Add
using Merchello.Web
- it's now in the MerchelloHelperExtensions.cs file.Hi Rusty,
That's great, that fixes that one.
I now have another - this line of code in the Catalog view is raising an error:
'IProductCollection' does not contain a definition for 'Children' ...
Am I missing another reference, or do I need to update FastTrack to 2.3.0? If so how do I do that without losing all the customisation I've done on the templates?
Cheers,
Crac
That's in
Merchello.Web
as well. Just trying to cleanup the namespacing to make everything consistent.OK, just in case anyone else has the same problem, after adding
to the top of the view I then also had to change ProductCollection to IProductCollection in a couple of places to get it to work ...
I think you've renamed the IProductCollection.CollectionKey property to be just IProductCollection.Key now as well.
Cheers,
Crac
is working on a reply...