- Issue created by @ethanstraffin
The following may or may not be related to this issue, but I have encountered it immediately after successfully reactivating a subscription.
Warning: Undefined variable $entity_type_id in Drupal\recurly\Controller\RecurlySubscriptionReactivateController->reactivateSubscription() (line 53 of modules/contrib/recurly/src/Controller/RecurlySubscriptionReactivateController.php).
Drupal\recurly\Controller\RecurlySubscriptionReactivateController->reactivateSubscription(Object, 'latest')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
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}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
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: 51)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)- First commit to issue fork.
- @eojthebrave opened merge request.
- Status changed to Needs review
over 1 year ago 6:50pm 21 March 2023 - πΊπΈUnited States eojthebrave Minneapolis, MN
Thanks for pointing out these issues.
I found that the variable used to create the redirect route was `$entity_type_id` but the actual variable in the code is `$entity_type`. Fixing that fixed the redirect.
I also noticed this controller doesn't have any tests so I added tests for it. Which pointed out that in the case where it gets an error response from Recurly the controller would return no value. Which is invalid. So I removed the early return and let it proceed to the redirect. And the error message still gets displayed.
- Status changed to RTBC
over 1 year ago 9:01pm 22 March 2023 -
eojthebrave β
committed 3b140508 on 4.x
Issue #3348306 by eojthebrave, ethanstraffin, blakehall:...
-
eojthebrave β
committed 3b140508 on 4.x
- Status changed to Fixed
over 1 year ago 11:38am 23 March 2023 - πΊπΈUnited States eojthebrave Minneapolis, MN
Thanks for reporting this issue @ethanstraffin. And for the quick review @blakehall. This has been merged into 4.x-dev.
Automatically closed - issue fixed for 2 weeks with no activity.