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.

CommentFileSizeAuthor
#7 out_of_scope.png19.42 KBguilhermevp
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mkalkbrenner created an issue. See original summary.

mkalkbrenner’s picture

Issue summary: View changes
mkalkbrenner’s picture

Issue summary: View changes
mkalkbrenner’s picture

Issue summary: View changes

mkalkbrenner’s picture

Status: Active » Needs review
guilhermevp’s picture

Status: Needs review » Needs work
StatusFileSize
new19.42 KB

Patch 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.

1

mkalkbrenner’s picture

The merge is required to get it installed via composer at the moment ;-)

But there're more issues :-(

mkalkbrenner’s picture

Status: Needs work » Needs review
mkalkbrenner’s picture

Sorry 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!

cspitzlay made their first commit to this issue’s fork.

cspitzlay’s picture

I had to provide the commerce_store.current_store as argument or the changed code crashed ...

mkalkbrenner’s picture

I had to provide the commerce_store.current_store as argument or the changed code crashed ...

yes, I missed that file in my commit.

mkalkbrenner’s picture

@cspitzlay, if you tested it, you can mark it as reviewed ;-)

cspitzlay’s picture

Status: Needs review » Reviewed & tested by the community
drugan’s picture

Looks good!

The only thing is may be to remove lines in the commerce_quick_purchase.info.yml and commerce_quick_purchase.info.yml files which reflect removing the README help dependency.

Just because we do it in another issue:

#3213602: Don't depend on README help

drugan’s picture

Status: Reviewed & tested by the community » Needs work

mkalkbrenner’s picture

Status: Needs work » Fixed

I'll immediately fix the Readme issues in #3213602: Don't depend on README help

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.