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
Solidus appears to be referencing SpreeUser even though Spree.user_class is set to 'User' on an existing Rails app #3745
Comments
I think I found the issue... In db/schema.rb, I see the following: Since I've set Spree.user_class to "User" in my app, I was able to create and run the following migration:
After restarting the app, my Order was able to successfully process! So... the bad news: I'm still a complete noob to Solidus so not yet ready to put together a PR to fix this just yet. Just documenting this here in case it helps someone else in the meantime! |
Thanks for reporting! |
This might need some additional documentation around using your own user class. When setting up with your own user class it should work out of the box, however if you change it after the initial installer run it will fail like described here. The migration here is using the configured table name correctly. |
Good find, @peterberkenbosch! @paulsingh Looks like you might just need to drop and recreate that foreign key. |
@peterberkenbosch can you please help me understand how exactly you can set the custom user_class before running the solidus installer? In my understanding, it's the installer itself that creates the |
You are totally right @kennyadsl, we can't update this before installing. This needs a different approach indeed. |
Solidus Version:
2.10.2
To Reproduce
db:seed
to get the default values installed and add a sample product to the store.solidus_auth_devise
gem and follow the instructions for setting Spree.user_class here: https://guides.solidus.io/developers/users/custom-authentication.htmlSQLException: no such table: main.spree_users
error.Current behavior
The order should be completed successfully. Instead, an
SQLException: no such table: main.spree_users
error is thrown.Expected behavior
The user should be able to successfully checkout / purchase their cart items.
Desktop (please complete the following information):
Additional context
Log output is available here: https://gist.github.com/paulsingh/ab49d1977219971f72430351ffecc875
The text was updated successfully, but these errors were encountered: