Open hkrdrm opened 5 years ago
@hkrdrm what environment is your server set to? @acreilly can you take a look?
its set to production I ran the rake task with RAILS_ENV=production also. It seems like it might have something to do with a particular order or maybe the way the product is setup. I can get the error also in the dev environment now if choose an older item but the new item i setup doesn't cause the error.
It seems to happen soon as click ship. Before I ship the order it seems to load the page fine.
I think I've narrowed the problem down before you click ship Spree:LineItem is being passed into the _additional_line_item_fields.html.erb partial. But once you click ship it then tries to pass in Spree::ShippingManifest::ManifestItem but its looking for LineItem not ShippingManifest.
I may try to hack it a bit it looks like the ShippingManifest has LineItem as a child.
<% if item.is_a?(Spree::ShippingManifest::ManifestItem) %>
<% item = item.line_item %>
<% end %>
Adding these 3 lines to the top of _additional_line_item_fields.html.erb seems to have solved the problem. Not sure if this is a proper fix though.
I'm having trouble with this gem. I have it working in my development environment but when I push it to the server I get this error whenever I try to view / edit an order.