You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It happens that stores change their payment method over the years. When switching to a new extension it's a good practice to remove the old one once the migration is done. But by doing so, we'll have a lot of references in the database that points, through STI, to a class that doesn't exist anymore.
When this happens, we should find a way to avoid the application to raise an exception similar to:
ActiveRecord::SubclassNotFound (The single-table inheritance mechanism failed to locate the subclass: 'Solidus::Gateway::BraintreeGateway'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Spree::PaymentMethod.inheritance_column to use another column for that information.)
I'm not sure it's possible, I'd make an attempt to explore some possible solutions though.
An alternative could be documenting best practices for switching from a payment method to another in our guides, in order to point users to a good resource when they are facing this scenario.
The text was updated successfully, but these errors were encountered:
It happens that stores change their payment method over the years. When switching to a new extension it's a good practice to remove the old one once the migration is done. But by doing so, we'll have a lot of references in the database that points, through STI, to a class that doesn't exist anymore.
When this happens, we should find a way to avoid the application to raise an exception similar to:
I'm not sure it's possible, I'd make an attempt to explore some possible solutions though.
Solidus Version:
All solidus versions
To Reproduce
See this issue as an example: solidusio/solidus_paypal_braintree#184
Additional context
An alternative could be documenting best practices for switching from a payment method to another in our guides, in order to point users to a good resource when they are facing this scenario.
The text was updated successfully, but these errors were encountered: