WSOD on creating payment view. Below are steps to reproduce:

1. Fresh install D8.3.0-rc1
2. Fresh install latest DC2.x
3. Create view at /admin/structure/views/add
4. Select "Payment" of type "Default" (If all selected, it works)
5. Click continue and edit
6. WSOD

I am guessing the code name of the default type might be inconsistent, because commerce_payment declares the default type with the code name "payment_default"; Usually, it was just "default"

Comments

skyredwang created an issue. See original summary.

bojanz’s picture

payment_default is correct.
Enable error reporting, look at your logs, let's see the actual error message.

skyredwang’s picture

Below is the backtrace:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 133 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
Drupal\Core\Entity\EntityTypeManager->getHandler(NULL, 'storage') (Line: 169)
Drupal\Core\Entity\EntityTypeManager->getStorage(NULL) (Line: 64)
Drupal\Core\Entity\EntityManager->getStorage(NULL) (Line: 127)
Drupal\views\Plugin\views\filter\Bundle->calculateDependencies() (Line: 47)
Drupal\views\Plugin\views\display\DisplayPluginBase->calculatePluginDependencies(Object, 1)
array_walk(Array, Array) (Line: 953)
Drupal\views\Plugin\views\display\DisplayPluginBase->calculateDependencies() (Line: 47)
Drupal\Core\Config\Entity\ConfigEntityBase->calculatePluginDependencies(Object) (Line: 281)
Drupal\views\Entity\View->calculateDependencies() (Line: 346)
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 291)
Drupal\views\Entity\View->preSave(Object) (Line: 434)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 389)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 259)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 364)
Drupal\Core\Entity\Entity->save() (Line: 637)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 986)
Drupal\views_ui\ViewUI->save() (Line: 189)
Drupal\views_ui\ViewAddForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('view_add_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('view_add_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
vasike’s picture

i can confirm this issue.

it seems there is something with the bundle plugin solution and views
Views don’t get the type entities from the bundle plugin solution.
Actually i think the types (as commerce_payment_type) are not at all in system.

bojanz’s picture

Issue tags: +DevDaysSeville
harings_rob’s picture

Assigned: Unassigned » harings_rob
harings_rob’s picture

I am going to need some help on this one.

I did some research and was not able to find any solution. The PaymentTypeManager is never called during the process, which makes me think that the bundle_plugin_type does not correctly work.

I tried looking for similar implementations in core, but was unable to find any.

harings_rob’s picture

Could it be related to: https://www.drupal.org/node/2817751

FatherShawn’s picture

So although payment type does not filter properly as a standard filter, I was able to get a view to work using a fixed contextual filter.

joachim’s picture

FatherShawn’s picture

I'll give this another try with the fix in #2973141 in place

mglaman’s picture

Status: Active » Postponed (maintainer needs more info)

Let's postpone for feedback. There might be a lot more to it. See our work in Reports #2945568: Ensure bundle plugin fields are available in fields. Payment bundle fields may not be available. I think it matters more for payment methods than payments, though.

handkerchief’s picture

I don't get it. Should this work right now? Because I'm not able to getting a relationship to the payment entity in views. E.g. in the user order view.

bojanz’s picture

There is no relationship from orders to payments, confirmed.

handkerchief’s picture

bojanz’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

I have re-tested a payments view with the latest improvements in Commerce -dev (future 2.16):
#3096916: Generate reverse relationships for base entity references
#3057438: Move the commerce_order_views_data_alter() state_machine workaround to CommerceEntityViewsData

I was able to create a payment view filtered to a specific type. I was able to add the amount and state fields. I was able to add a state filter and use it exposed. I was able to add a relationship to the parent order, and pull in a field (the order total).

I have also confirmed that it is possible to add a relationship from the order to the payments, thanks to the new reverse relationships.

Closing this issue. Thanks everyone!