Problem/Motivation
Since the commit of #3081145: Remove BC layers in the Plugin component the module causes an error:
AssertionError: assert(strpos($data_type, 'entity:') !== 0 || $this instanceof EntityContextDefinition) in assert() (line 112 of core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php).
assert(, 'assert(strpos($data_type, 'entity:') !== 0 || $this instanceof EntityContextDefinition)') (Line: 112)
Drupal\Core\Plugin\Context\ContextDefinition->__construct('entity:commerce_product', Object) (Line: 87)
Drupal\commerce_quick_purchase\ContextProvider\QuickPurchaseRouteContext->getAvailableContexts() (Line: 97)
Drupal\Core\Plugin\Context\LazyContextRepository->getAvailableContexts() (Line: 114)
Drupal\Core\ParamConverter\EntityConverter->convert('1', Array, 'node', Array) (Line: 100)
Drupal\Core\ParamConverter\ParamConverterManager->convert(Array) (Line: 45)
Drupal\Core\Routing\Enhancer\ParamConversionEnhancer->enhance(Array, Object) (Line: 244)
Drupal\Core\Routing\Router->applyRouteEnhancers(Array, Object) (Line: 118)
Drupal\Core\Routing\Router->matchRequest(Object) (Line: 92)
Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 112)
Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object)
call_user_func(Array, Object, 'kernel.request', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 134)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 49)
Drupal\jt_commerce\StackMiddleware\SearchParameters->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
The change record is https://www.drupal.org/node/2976400.
Comments
Comment #2
mkalkbrennerComment #3
mkalkbrennerComment #4
mkalkbrennerComment #6
mkalkbrennerComment #7
guilhermevp commentedPatch applies and work as intended, but also has the changes that are expected to be addressed in #3213602: Don't depend on README help. Maybe revert this change here so it can be applied in the refereed issue.
Other than that, is good to go.
Comment #8
mkalkbrennerThe merge is required to get it installed via composer at the moment ;-)
But there're more issues :-(
Comment #9
mkalkbrennerComment #10
mkalkbrennerSorry for packing all in one issue. But it makes no sense to split it in several patches as one depend on the other.
This MR solves the Drupal 9 compatibility, the store logic and the compatibility with the comerce_store_domain and theme_switcher modules!
Comment #12
cspitzlayI had to provide the commerce_store.current_store as argument or the changed code crashed ...
Comment #13
mkalkbrenneryes, I missed that file in my commit.
Comment #14
mkalkbrenner@cspitzlay, if you tested it, you can mark it as reviewed ;-)
Comment #15
cspitzlayComment #16
drugan commentedLooks good!
The only thing is may be to remove lines in the
commerce_quick_purchase.info.ymlandcommerce_quick_purchase.info.ymlfiles which reflect removing theREADME helpdependency.Just because we do it in another issue:
#3213602: Don't depend on README help
Comment #17
drugan commentedComment #19
mkalkbrennerI'll immediately fix the Readme issues in #3213602: Don't depend on README help