Problem/Motivation
When trying to add a payment method configuration a fatal error occurs: Fatal error: Call to undefined method Drupal\Core\StringTranslation\TranslationWrapper::setStringTranslation() in /Users/ricovandevin/Sites/community/8/mollie_payment/modules/payment/src/Plugin/Payment/Status/PaymentStatusManager.php on line 94
. Also the use of TranslationWrapper
is now deprecated. The same fatal error is shown when viewing a node with a payment form field.
This problem occurs with Drupal 8.0.0-dev (commit 1d1fe19702f5dc6894acc45431b1d0c85ab306d7) and Payment 8.x-2.x-dev (commit 626df3660066980ded45a1accc643aa1ae855847).
Proposed resolution
Avoid the use of setStringTranslation
. Replace all uses of TranslationWrapper
by TranslatableString
.
Remaining tasks
- Create a patch that addresses the fatal error.
- Replace all uses of
TranslationWrapper
.
Comment | File | Size | Author |
---|---|---|---|
#4 | payment-fatal-error-setstringtranslation-2574587-4.patch | 1.14 KB | s_leu |
#2 | payment-fatal-error-setstringtranslation-2574587-2.patch | 1.25 KB | ricovandevin |
Comments
Comment #2
ricovandevin CreditAttribution: ricovandevin at Finlet commentedPatched to solve fatal error.
Comment #3
ricovandevin CreditAttribution: ricovandevin at Finlet commentedComment #4
s_leu CreditAttribution: s_leu at MD Systems GmbH commentedHere's a re-roll.
Comment #5
XanoPlease file this as a pull request on https://github.com/bartfeenstra/drupal-payment. We cannot work on patches here anymore, because we require a more flexible testing infrastructure than the one drupal.org provides.
Comment #6
Xano