- Issue created by @papagrande
- Assigned to papagrande
- Issue was unassigned.
- Status changed to Needs review
8 months ago 10:00pm 15 April 2024 - πΊπΈUnited States erindarri
Thanks for improving this form!
When I initially updated with this patch and my token was incorrect, the forms weren't connected correctly, so I don't see any form name listed (as expected). However, I do also get a warning:
Warning: Undefined array key 173 in Drupal\webform_eloqua\Plugin\WebformHandler\WebformEloquaHandler->getSummary() (line 79 of modules/contrib/webform_eloqua/src/Plugin/WebformHandler/WebformEloquaHandler.php). Drupal\webform_eloqua\Plugin\WebformHandler\WebformEloquaHandler->getSummary() (Line: 100) Drupal\webform\WebformEntityHandlersForm->form(Array, Object) (Line: 107) Drupal\Core\Entity\EntityForm->buildForm(Array, Object) (Line: 69) Drupal\webform\WebformEntityHandlersForm->buildForm(Array, Object) call_user_func_array(Array, Array) (Line: 536) Drupal\Core\Form\FormBuilder->retrieveForm('webform_handlers_form', Object) (Line: 283) Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73) Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39) Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627) 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: 181) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) 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: 28) Drupal\Core\StackMiddleware\ContentLength->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: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Is it possible to combine this with MR !6 β¨ Provide a message to the end user when the authentication token fails Needs review to show a message that says to update the token with the link to the API and secrets at this point instead of once it is in the form like in the other MR? If this could be displayed here, I don't think that MR !6 is necessary.
Once I got my token, the form name displays as expected.
- Status changed to Needs work
7 months ago 9:24pm 26 April 2024 - πΊπΈUnited States papagrande US West Coast
Based on https://www.drupal.org/project/eloqua_api_redux/issues/3358253#comment-15571333 π Provide a message to the end user when the authentication token fails Needs review , let's add a refresh token check to the summary as well.
- πΊπΈUnited States papagrande US West Coast
After some discussion, we figured out we can use the
getForm()
method on theeloquaFormsService
using the form ID stored in the handler to see if the API is reachable. We can use that to display the API connection status in the handler summary along with a link to the settings page if it is not. - Status changed to Needs review
7 months ago 6:31pm 27 April 2024