- Issue created by @alfattal
- 🇺🇸United States alfattal Minnesota
Workaround
Just change:
default_value_callback: 'Drupal\commerce_product\Entity\ProductVariation::getCurrentUserId'
to:
default_value_callback: 'Drupal\commerce_product\Entity\ProductVariation::getDefaultEntityOwner'
Inconfig/default/core.base_field_override.consumer.consumer.owner_id.yml
With a fresh setup, I attempted to reproduce the issue on my system but encountered an unexpected error when trying to add a new consumer with any website.
@alfattal Could you please provide more details or steps to help reproduce the issue consistently? Let me know if there are specific configurations or scenarios I might have missed.
- 🇺🇸United States alfattal Minnesota
@kushagra.goyal Your comment is confusing. You mentioned that you've attempted to reproduce the issue and got the error that I already mentioned in this ticket, but then you are asking for testing steps to reproduce which you already did!
Nevertheless, here are the steps:
On a fresh or old Drupal setup, check the
default_value_callback
in the config filecore.base_field_override.consumer.consumer.owner_id.yml
. If it has the deprecated call back that ends withgetCurrentUserId
, then it will throw the error.