solidusio / solidus_stripe

💳 Integrate Solidus with Stripe
https://stripe.com
BSD 3-Clause "New" or "Revised" License
36 stars 62 forks source link

ActionView::MissingTemplate in Spree::Checkout#edit #127

Closed joyboy67 closed 1 year ago

joyboy67 commented 2 years ago

Solidus version

3.2.2 with solidus_starter_frontend

Problem

Hello I installed solidus_stripe (4.3.0) but when I go to the route checkout/payment I get

ActionView::MissingTemplate in Spree::Checkout#edit 

 Showing /home/computer/shop/app/views/spree/checkout/steps/payment_step/_payment_method_controls.html.erb where line#4 raised:

  Missing partial spree/checkout/payment/_stripe with {:locale=>[:fr], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder, :haml]}.

Searched in:
  * "/home/computer/shop/app/views"
  * "/usr/local/lib/ruby/gems/3.1/gems/solidus_stripe-4.3.0/lib/views/backend"
  * "/usr/local/lib/ruby/gems/3.1/gems/solidus_stripe-4.3.0/lib/views/api"
  * "/usr/local/lib/ruby/gems/3.1/gems/view_component-2.71.0/app/views"
  * "/usr/local/lib/ruby/gems/3.1/gems/solidus_backend-3.2.2/app/views"
  * "/usr/local/lib/ruby/gems/3.1/gems/kaminari-core-1.2.2/app/views"
  * "/usr/local/lib/ruby/gems/3.1/gems/solidus_api-3.2.2/app/views"
  * "/usr/local/lib/ruby/gems/3.1/gems/solidus_auth_devise-2.5.4/lib/views/backend"
  * "/usr/local/lib/ruby/gems/3.1/gems/devise-4.8.1/app/views"
  * "/usr/local/lib/ruby/gems/3.1/gems/solidus_core-3.2.2/app/views"
  * "/usr/local/lib/ruby/gems/3.1/gems/actiontext-7.0.4/app/views"
  * "/usr/local/lib/ruby/gems/3.1/gems/actionmailbox-7.0.4/app/views"

Did you mean?  spree/api/payments/source_views/stripe
               spree/admin/log_entries/stripe
               spree/admin/payments/source_forms/stripe
               spree/admin/payments/source_views/stripe
               spree/checkout/payment/gateway
               spree/admin/promotions/rules/store

Extracted source (around line #4):

<% methods.each do |method| %>
     <li id="payment_method_<%= method.id %>">
       <%= render( 
        "spree/checkout/payment/#{method.partial_name}",
        payment_method: method
     ) %>

Trace of template inclusion: #<ActionView::Template 
app/views/spree/checkout/steps/_payment_step.html.erb 
locals=["differentiator", "form"]>, #<ActionView::Template 
app/views/spree/checkout/_checkout_step.html.erb locals=["order"]>, 
#<ActionView::Template app/views/spree/checkout/edit.html.erb 
locals=[]>

Rails.root: /home/computer/shop
joyboy67 commented 2 years ago

After looking into the rails console it appears that SolidusSupport.frontend_available? is on nil

irb(main):004:0> SolidusSupport.frontend_available?
=> nil
irb(main):005:0> SolidusSupport.api_available?
=> "constant"
irb(main):006:0> SolidusSupport.backend_available?
=> "constant"
joyboy67 commented 2 years ago

I'm in development mode, maybe the error come because I don't have solidus_dev_support ? -> https://github.com/solidusio/solidus/discussions/4583

kennyadsl commented 1 year ago

Should be fixed with #129