I had upgraded to Merchello 1.9 (Umbraco 7.2) and just realized that I cannot create coupon offers. Here's what happens:
create offer
configure rewards: If I select 'free shipping'
everything saves fine. If I select discount and try to save either percentage
or amount, I get this error:
/umbraco/backoffice/Merchello/MarketingApi/PutUpdateOfferSettings 500 (Internal Server Error)
Once the error happens (in dialog with no stack trace) I can delete the offer. If i don't delete the offer, then I get this error when I go back to the Marketing section:
/umbraco/backoffice/Merchello/MarketingApi/SearchOffers 500 (Internal Server Error)
Checking the database, looks like the record is created in the merchOfferSettings table. Manually deleting it from the table also solves the 500 error.
I don't know if this sheds any more light, but it looks like reporting is not working either. When I click on the node, nothing happens. I'm not getting any errors in the console either. I updated this install awhile ago and I don't remember exactly how I did it so I'm going to attempt a reinstall of Merchello...
EDIT/UPDATE:
I'm looking at the merchTypeField table and I don't have a column called 'CustomerCredit'. What data type should this be?
ok. what is the data type for the CustomerCredit Field? Is there documentation on that somewhere? Sorry if this should be obvious, I'm just not finding it :)
@Tyler I just tried adding a coupon after deleting that field and it was successful ... so there must be something else going on. I did looked at the install again, and I commented out this field for the time being - so sorry for the confusion here.
The value will be but it's not going to us much good.
My original post has the console errors. I probably wasn't clear: I get an error with no stack trace in a dialog window, but the console shows the error detail. When I add a discount amount to the coupon, I get this in the console:
/umbraco/backoffice/Merchello/MarketingApi/PutUpdateOfferSettings 500 (Internal Server Error)
Then, if I go back to the main marketing section, nothing shows up in the main window and I get this in the console:
/umbraco/backoffice/Merchello/MarketingApi/PutUpdateOfferSettings 500 (Internal Server Error)
Everything is fine if I delete the record that was created in the merchOfferSettings table.
ok a little more info, just to be clear, this only happen when I click the save button in the Offer Reward Dialog (Merchello.Marketing.Dialogs.OfferRewardCouponDiscountPrice) and ONLY if I place a value in the textbox or try and change the radio button. If I just save the dialog without changing anything it saves fine.
actually, disregard the GET error (I think I've been staring at this too long!)
I tried reinstalling Merchello 1.9.0 and I get the 500 error. BUT I'm seeing a response with a stack trace now that should help:
{"message":"An error has occurred.","exceptionMessage":"Attempt by method 'Merchello.Web.Discounts.Coupons.Rewards.CouponDiscountLineItemReward.get_AdjustmentType()' to access method 'Umbraco.Core.Enum`1<Merchello.Web.Discounts.Coupons.Rewards.CouponDiscountLineItemReward+Adjustment>.Parse(System.String, Boolean)' failed.","exceptionType":"System.MethodAccessException","stackTrace":" at Merchello.Web.Discounts.Coupons.Rewards.CouponDiscountLineItemReward.get_AdjustmentType() in c:\\Working Repositories\\GitHub\\Merchello\\src\\Merchello.Web\\Discounts\\Coupons\\Rewards\\CouponDiscountLineItemReward.cs:line 76\r\n at Merchello.Web.Discounts.Coupons.Rewards.CouponDiscountLineItemReward.get_DisplayConfigurationFormat() in c:\\Working Repositories\\GitHub\\Merchello\\src\\Merchello.Web\\Discounts\\Coupons\\Rewards\\CouponDiscountLineItemReward.cs:line 90\r\n at lambda_method(Closure , Object )\r\n at AutoMapper.Impl.PropertyGetter.GetValue(Object source)\r\n at AutoMapper.Impl.MemberGetter.Resolve(ResolutionResult source)\r\n at AutoMapper.PropertyMap.<ResolveValue>b__6(ResolutionResult current, IValueResolver resolver)\r\n at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)\r\n at AutoMapper.PropertyMap.ResolveValue(ResolutionContext context)\r\n at AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.MapPropertyValue(ResolutionContext context, IMappingEngineRunner mapper, Object mappedObject, PropertyMap propertyMap)"}
I've double-checked that I'm using the Merchello 1.9.0 dlls
Welp, still not sure what the issue was, but I started incrementing my Umbraco install and I no longer get the error when using Umbraco 7.2.2 so I'm calling that a win!
Marketing works, but Products, Sales, Customers, etc are now throwing errors (value cannot be null errors) on top of that, I can't get to the developer section in Umbraco- I'm not authorized. Gonna try and sort this out :)
Merchello 1.9 Error when creating coupon offer
I had upgraded to Merchello 1.9 (Umbraco 7.2) and just realized that I cannot create coupon offers. Here's what happens:
or amount, I get this error:
/umbraco/backoffice/Merchello/MarketingApi/PutUpdateOfferSettings 500 (Internal Server Error)
Once the error happens (in dialog with no stack trace) I can delete the offer. If i don't delete the offer, then I get this error when I go back to the Marketing section:
/umbraco/backoffice/Merchello/MarketingApi/SearchOffers 500 (Internal Server Error)
Checking the database, looks like the record is created in the merchOfferSettings table. Manually deleting it from the table also solves the 500 error.
Any thoughts?
@Tyler -
What format are you entering the numbers? Do they have a comma for a decimal place?
Are you using any constraints?
Rusty,
Since it's a number field, I've just used integers, but I just tried using a decimal for amount and I get the same error.
I get the same result whether or not I have any constraints.
Can you post the data from the row in the OfferSettings table. May help figure out what is going on.
Above is the value of configurationData. Below is the row as it is/was in the database:
I don't know if this sheds any more light, but it looks like reporting is not working either. When I click on the node, nothing happens. I'm not getting any errors in the console either. I updated this install awhile ago and I don't remember exactly how I did it so I'm going to attempt a reinstall of Merchello...
EDIT/UPDATE:
I'm looking at the merchTypeField table and I don't have a column called 'CustomerCredit'. What data type should this be?
The CustomerCredit would affect the coupons. That needs to be added to your merchTypeField table ...
ok. what is the data type for the CustomerCredit Field? Is there documentation on that somewhere? Sorry if this should be obvious, I'm just not finding it :)
@Tyler I just tried adding a coupon after deleting that field and it was successful ... so there must be something else going on. I did looked at the install again, and I commented out this field for the time being - so sorry for the confusion here.
The value will be but it's not going to us much good.
Are there JS errors in your console window?
Rusty,
My original post has the console errors. I probably wasn't clear: I get an error with no stack trace in a dialog window, but the console shows the error detail. When I add a discount amount to the coupon, I get this in the console:
/umbraco/backoffice/Merchello/MarketingApi/PutUpdateOfferSettings 500 (Internal Server Error)
Then, if I go back to the main marketing section, nothing shows up in the main window and I get this in the console:
/umbraco/backoffice/Merchello/MarketingApi/PutUpdateOfferSettings 500 (Internal Server Error)
Everything is fine if I delete the record that was created in the merchOfferSettings table.
The 500 error on PutUpdateOfferSettings response is:
{"message":"The requested resource does not support http method 'GET'."}
ok a little more info, just to be clear, this only happen when I click the save button in the Offer Reward Dialog (Merchello.Marketing.Dialogs.OfferRewardCouponDiscountPrice) and ONLY if I place a value in the textbox or try and change the radio button. If I just save the dialog without changing anything it saves fine.
Wow that makes no sense. GET?
Can you search for 'PutUpdateOfferSettings' in
/App_Plugins/Merchello/js/merchello.resources.js
The method should look like
actually, disregard the GET error (I think I've been staring at this too long!)
I tried reinstalling Merchello 1.9.0 and I get the 500 error. BUT I'm seeing a response with a stack trace now that should help:
I've double-checked that I'm using the Merchello 1.9.0 dlls
I sent you a DM on twitter.
Welp, still not sure what the issue was, but I started incrementing my Umbraco install and I no longer get the error when using Umbraco 7.2.2 so I'm calling that a win!
Awesome - there must have been an Umbraco dependency that created a slight breaking change that I did not know about. Great work getting it sorted!
Spoke too soon!
Marketing works, but Products, Sales, Customers, etc are now throwing errors (value cannot be null errors) on top of that, I can't get to the developer section in Umbraco- I'm not authorized. Gonna try and sort this out :)
Circling back to older posts... My latest problem was simply a routing problem from an unrelated project. So we're good.
is working on a reply...