Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Product
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2016 at 21:58 UTC
Updated:
16 Nov 2022 at 13:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mglamanMake sure that the default variation is active and user has access.
Comment #4
bojanz commentedComment #6
casey commentedThis seems to introduce recursion errors; the ProductVariationAccessControlHandler uses ProductVariationInterface::getProduct() which calls ComputedDefaultVariation::computeValue() which calls ProductInterface::getDefaultVariation(). This happens when the product is not yet cached via ContentEntityStorageBase::setPersistentCache(). If the user has no admin permissions, the access('view') call will be recursive.
Attached a patch to test without access check.