Hi everyone, when i am testing in production and c...
# support
f
Hi everyone, when i am testing in production and clicking on "Add to Cart", i have this error : The change you wanted was rejected. Maybe you tried to change something you didn't have access to" ActiveRecord::RecordInvalid (Validation failed: Store can't be blank): app/controllers/cart_line_items_controller.rb12in `create' But everything is ok on Localhost, any idea ?
k
Do you have a store created in production? And is that store associated with your products?
f
what do you mean by a store created in production?
like Heroku ?
k
No a Spree::Store. You can go into admin -> setting and see if you have one
In development, the installer runs
bin/rails db:seed
to populate the database with a layer of data that is needed for any store to work, see https://github.com/solidusio/solidus/blob/master/core/db/seeds.rb. Did you managed to run that command in production on your first deploy?
f
I have created a new tore and it works now, thank you ! (I didn't run the db:seed in production)
🎉 1
a new store*
in the demo, there is the cart logo and link with the numebers of product, but not for me, is it normal ?
k
yes, the demo uses a cuostm style
f
is it possibile to get this custom style ?
k
you can find the source code here: https://github.com/solidusio/solidus-demo
f
thanks !
now, there is an error because the checkoput form asks to fill the state which is presents in ths solidus demo but not in solidus version
2 errors prohibited this record from being saved: There were problems with the following fields: • Billing address state can't be blank • Shipping address state can't be blank Checkout 1. Address
just in case, is there a repo where these errors are already corrected ?
k
Can you check if you have a JS error on that page?
f
yes you'right : 7lidus_starter_frontend-59ea358115efb22e67ccc054f2a1987bb1f15c91cfee998392fa7087c2a05acc.js:1154 Uncaught ReferenceError: $ is not defined at solidus_starter_frontend-59ea358115efb22e67ccc054f2a1987bb1f15c91cfee998392fa7087c2a05acc.js115445 at solidus_starter_frontend-59ea358115efb22e67ccc054f2a1987bb1f15c91cfee998392fa7087c2a05acc.js13073 (anonyme) @ solidus_starter_frontend-59ea358115efb22e67ccc054f2a1987bb1f15c91cfee998392fa7087c2a05acc.js:1154 (anonyme) @ solidus_starter_frontend-59ea358115efb22e67ccc054f2a1987bb1f15c91cfee998392fa7087c2a05acc.js:1307 address:52 Uncaught ReferenceError: Solidus is not defined at address525 (
where does it come from ?
I don't understand... i don't have this problem in localhost
I have the same problem... sorry, any idea please ?