Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedpayment_default is correct.
Enable error reporting, look at your logs, let's see the actual error message.
Comment #3
skyredwangBelow is the backtrace:
Comment #4
vasikei 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.
Comment #5
bojanz CreditAttribution: bojanz at Centarro commentedComment #6
harings_rob CreditAttribution: harings_rob at Harings.be for Nuvole commentedComment #7
harings_rob CreditAttribution: harings_rob at Harings.be for Nuvole commentedI 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.
Comment #8
harings_rob CreditAttribution: harings_rob at Harings.be for Nuvole commentedCould it be related to: https://www.drupal.org/node/2817751
Comment #9
FatherShawnSo 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.
Comment #10
joachim CreditAttribution: joachim commentedProbably caused by #2914091: Views filter handler for bundle field crashes for an entity with bundle plugins.
Comment #11
FatherShawnI'll give this another try with the fix in #2973141 in place
Comment #12
mglamanLet'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.
Comment #13
handkerchiefI 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.
Comment #14
bojanz CreditAttribution: bojanz at Centarro commentedThere is no relationship from orders to payments, confirmed.
Comment #15
handkerchiefSo I came up with this workaround:
https://www.drupal.org/project/commerce/issues/2924023#comment-13103505
Comment #16
bojanz CreditAttribution: bojanz at Centarro commentedI 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!