Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spree 2 Upgrade] undefined method zone_id for ShippingMethod #2497

Closed
sauloperez opened this issue Jul 23, 2018 · 2 comments
Closed

[Spree 2 Upgrade] undefined method zone_id for ShippingMethod #2497

sauloperez opened this issue Jul 23, 2018 · 2 comments
Assignees
Labels
spike A time-boxed investigation/implementation to access suitability of a tool or feature

Comments

@sauloperez
Copy link
Contributor

Description

While trying to create a shipping method from /admin I got the following error in the Rails server:

Completed 500 Internal Server Error in 442.9ms (ActiveRecord: 5.7ms)
** [Bugsnag] No API key configured, couldn't notify

ActionView::Template::Error (undefined method `zone_id' for #<Spree::ShippingMethod:0x00562b39694b40>):
    26:       <%= f.label :zone_id, t(:zone) %>
    27:     </div>
    28:     <div class="omega eight columns">
    29:       <%= f.collection_select(:zone_id, @available_zones, :id, :name, {}, {:class => 'select2 fullwidth'}) %>
    30:       <%= error_message_on :shipping_method, :zone_id %>
    31:     </div>
    32:   </div>
  lib/spree/core/controller_helpers/respond_with_decorator.rb:15:in `call'
  lib/spree/core/controller_helpers/respond_with_decorator.rb:15:in `respond_with'

It seems like the zone_id column was moved out of the spree_shipping_methods table.

Expected Behavior

Shipping methods can be created from /admin. This deserves some initial investigation which might change the scope of this issue. It could be harder than a simple one-PR fix.

Actual Behavior

The app displays the error showed above.

Steps to Reproduce

Visit /admin/shipping_methods/new.

@sauloperez sauloperez added the spike A time-boxed investigation/implementation to access suitability of a tool or feature label Jul 23, 2018
@luisramos0
Copy link
Contributor

luisramos0 commented Aug 24, 2018

To get the top level epic cleaner, I moved this one under the epic #2011 Multi Shipments. This is in the backoffice but the work is closely related to the shipments work that needs to be done.

@luisramos0 luisramos0 changed the title [Spree Upgrade] undefined method zone_id for ShippingMethod [Spree 2 Upgrade] undefined method zone_id for ShippingMethod Aug 24, 2018
@luisramos0 luisramos0 self-assigned this Sep 22, 2018
@luisramos0
Copy link
Contributor

I just realized #2744 is an exact duplicate of this issue. My mistake, didnt see the duplication. Closing this one as 2744 has now more info and context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spike A time-boxed investigation/implementation to access suitability of a tool or feature
Projects
None yet
Development

No branches or pull requests

2 participants