Doing routine maintenance on one of our sites and ...
# support
t
Doing routine maintenance on one of our sites and looks like solidus_paypal_commerce_platform had a big update? After installing the new version, rails kept complaining about missing views, so based on the recent git commits, I ran the generator with
bin/rails generate solidus_paypal_commerce_platform:install
it added a lot of new files, and now I can get all the way to the payment step of checkout, where I get this error:
Copy code
Missing partial spree/checkout/payment/_paypal_commerce_platform with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in:
...
...
<%= render partial: "spree/checkout/payment/#{method.partial_name}", locals: { payment_method: method } %>
View appears to be the same as the current solidus_frontend commit (we're still using the old frontend on this site in case that may be related).
Shooting in the dark but I see that the generator created a file
views/checkouts/payment
with the right name
_paypal_commerce_platform.html.erb
, so I tried moving it into
views/spree/checkout/payment
and the checkout page loads, but if I select the PayPal Commerce payment method and hit save and continue, it says
Payments source PayPal order can't be blank
and the PayPal buttons that used to be there are gone now and I see this in the browser console
Uncaught ReferenceError: SolidusPaypalCommercePlatform is not defined
Ah finally got it. In addition to moving that file, I also had to add _`//= require spree/frontend/solidus_paypal_commerce_platform` to `vendor/assets/javascripts/spree/frontend/all.js`_
k
Hey Tyler, sorry for that. Which kind of update did you do? I mean, are you tracking the github repository or the rubygems package in your Gemfile?
t
We are tracking the git repo. Just a
bundle update
Copy code
gem "solidus_paypal_commerce_platform", github: "solidusio/solidus_paypal_commerce_platform"
should we be tracking the rubygems version instead for a more stable version?
k
yes, for this extension (and hopefully for all the others soon) you can rely on the rubygems version. For you should be 0.6.0. The Github repo now contains pretty big changes, since the extension is getting ready for a major bump.
t
Makes total sense. I think we had switched to a github repo in the past to patch a bug locally. we switched back to the solidus version recently, but were still pointed at github. I'll switch back and see if that's a lot smoother. Thanks for the advice!