Hi,
is the payment_reference field production ready ? Because after adding a payment_reference field to my content type it is showing error when i proceed to create the node
i am using drupal-8.3.1 with payment 8.x-2.0-rc3
Uncaught PHP Exception InvalidArgumentException: "Value is not a valid entity." at core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php line 106,
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | payment_2874885_1.patch | 932 bytes | biswajeetparida |
Comments
Comment #2
biswajeetparida commentedComment #3
biswajeetparida commentedThis solve my issue
Comment #4
Anonymous (not verified) commentedDoes this actually work?
While the PHP error is gone, the payment reference target_id returned seems to be 0, which is not helpful either.
Is the problem that the payment is not saved, so we have no payment id?
This actually seems to return an array:
So how would I actually get to the value of the saved payment?
I seem to be able to get the right target_id from:
$form_state->getStorage()['payment_reference.element.payment_reference.payment']->id();
Comment #5
berdirDoesn't seem to happen in tests, maybe something about nested form elements or so? Would need steps to reproduce on a clean site.