πŸ‡ΊπŸ‡ΈUnited States @erindarri

Account created on 7 January 2010, almost 15 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States erindarri

I applied the diff and this merges cleanly.
GitLab pipeline is still passing.

πŸ‡ΊπŸ‡ΈUnited States erindarri

I tested this in a local environment. The tokens are getting moved to state as expected. I'm still able to update the tokens as I had been before.

πŸ‡ΊπŸ‡ΈUnited States erindarri

Thanks @papagrande! I like this a lot. I didn't look extensively at the code, but

  • the patch applied fine
  • I like that I get the form name immediately
  • I like that if my tokens are gone I get a message that says to check my Eloqua connection.

Overall this looks good to me.

πŸ‡ΊπŸ‡ΈUnited States erindarri

When attempting to apply this against 2.0.x-dev, this is failing to apply for me in:

settings.php

--- src/Form/Settings.php
+++ src/Form/Settings.php
@@ -30,8 +30,10 @@ class Settings extends ConfigFormBase {
    * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
    *   Date Formatter.
    */
-  public function __construct(ConfigFactoryInterface $config_factory,
-                              DateFormatterInterface $date_formatter) {
+  public function __construct(
+    ConfigFactoryInterface $config_factory,
+    DateFormatterInterface $date_formatter,
+  ) {
     parent::__construct($config_factory);
     $this->dateFormatter = $date_formatter;
   }

and EloquaApiClient.php.

--- src/Service/EloquaApiClient.php
+++ src/Service/EloquaApiClient.php
@@ -70,16 +77,22 @@ class EloquaApiClient {
    *   A Guzzle client object.
    * @param \Drupal\Component\Datetime\TimeInterface $time
    *   Time service.
+   * @param \Drupal\eloqua_api_redux\Service\EloquaAuthFallbackInterface $authFallbackDefault
+   *   Eloqua auth fallback service.
    */
-  public function __construct(ConfigFactory $config,
-                              LoggerChannelFactoryInterface $loggerFactory,
-                              ClientFactory $httpClientFactory,
-                              TimeInterface $time) {
+  public function __construct(
+    ConfigFactory $config,
+    LoggerChannelFactoryInterface $loggerFactory,
+    ClientFactory $httpClientFactory,
+    TimeInterface $time,
+    EloquaAuthFallbackInterface $authFallbackDefault,
+  ) {
     $this->config = $config->get('eloqua_api_redux.settings');
     $this->configTokens = $config->getEditable('eloqua_api_redux.tokens');
     $this->loggerFactory = $loggerFactory;
     $this->httpClientFactory = $httpClientFactory;
     $this->time = $time;
+    $this->authFallbackDefault = $authFallbackDefault;
   }
 
   /**
πŸ‡ΊπŸ‡ΈUnited States erindarri

I am having trouble applying this patch against a clean install of v2.0.0.

Here is the whole patch message:

  - Applying patches for drupal/eloqua_api_redux
    https://git.drupalcode.org/project/eloqua_api_redux/-/merge_requests/5.patch (3440052: Move Ephemeral Token Data Out of Config and Into State (https://www.drupal.org/project/eloqua_api_redux/issues/3440052))
patch '-p1' --no-backup-if-mismatch -d '/var/www/html/web/modules/contrib/eloqua_api_redux' < '/tmp/662a79c8ba0ee.patch'
patching file eloqua_api_redux.post_update.php

patching file eloqua_api_redux.services.yml
patching file src/Form/Settings.php

patching file src/Service/EloquaApiClient.php
Hunk #4 succeeded at 64 with fuzz 2.

Hunk #9 succeeded at 261 (offset -1 lines).
Hunk #10 succeeded at 317 (offset -3 lines).
Hunk #11 succeeded at 348 (offset -4 lines).
Hunk #12 succeeded at 367 (offset -4 lines).

patching file src/Service/EloquaApiClient.php
Hunk #1 succeeded at 311 (offset -3 lines).
Hunk #2 succeeded at 429 (offset -4 lines).

patching file src/Service/EloquaApiClient.php
Hunk #3 succeeded at 267 with fuzz 1 (offset -1 lines).
Hunk #4 succeeded at 372 (offset -4 lines).
patching file config/install/eloqua_api_redux.tokens.yml
patching file src/Service/EloquaApiClient.php
Hunk #4 FAILED at 148.
Hunk #5 FAILED at 236.
Hunk #6 succeeded at 383 (offset -4 lines).
2 out of 6 hunks FAILED -- saving rejects to file src/Service/EloquaApiClient.php.rej
patching file src/Service/EloquaApiClientInterface.php
patching file tests/src/Unit/EloquaApiClientTest.php
Hunk #1 succeeded at 72 (offset -5 lines).
Hunk #2 succeeded at 107 (offset -5 lines).
Hunk #3 FAILED at 142.
Hunk #4 FAILED at 177.
Hunk #5 FAILED at 229.
Hunk #6 FAILED at 278.
4 out of 6 hunks FAILED -- saving rejects to file tests/src/Unit/EloquaApiClientTest.php.rej

patching file src/Service/EloquaApiClient.php
Hunk #1 succeeded at 318 (offset 9 lines).
Hunk #2 succeeded at 342 (offset 9 lines).

patch '-p0' --no-backup-if-mismatch -d '/var/www/html/web/modules/contrib/eloqua_api_redux' < '/tmp/662a79c8ba0ee.patch'
patching file b/eloqua_api_redux.post_update.php
can't find file to patch at input line 56
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/eloqua_api_redux.services.yml b/eloqua_api_redux.services.yml
|index ffd09b4..3d75791 100644
|--- a/eloqua_api_redux.services.yml
|+++ b/eloqua_api_redux.services.yml
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored

can't find file to patch at input line 69
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Form/Settings.php b/src/Form/Settings.php
|index 4c71511..7c1da72 100644
|--- a/src/Form/Settings.php
|+++ b/src/Form/Settings.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
6 out of 6 hunks ignored

can't find file to patch at input line 143
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 0658d9f..461ff95 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

12 out of 12 hunks ignored
can't find file to patch at input line 364
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 56e5bfc322fd3130a99ae7b8b170c02905a463a3 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:26:16 -0700
|Subject: [PATCH 2/7] Fix phpstan comparisons
|
|---
| src/Service/EloquaApiClient.php | 8 ++++----
| 1 file changed, 4 insertions(+), 4 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 461ff95..816a3ec 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

2 out of 2 hunks ignored
can't find file to patch at input line 406
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 3996aafeaf623991b46694843f3e4f767dad0243 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:37:34 -0700
|Subject: [PATCH 3/7] Fix phpstan empty() errors
|
|---
| src/Service/EloquaApiClient.php | 9 +++++----
| 1 file changed, 5 insertions(+), 4 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 816a3ec..3deaec6 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
4 out of 4 hunks ignored
The next patch would delete the file a/config/install/eloqua_api_redux.tokens.yml,
which does not exist!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 485
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 648841879314e6bec1983819d9dae955d3f4b5df Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 17:04:30 -0700
|Subject: [PATCH 5/7] Add EloquaApiClientInterface
|
|---
| src/Service/EloquaApiClient.php          | 57 ++--------------
| src/Service/EloquaApiClientInterface.php | 82 ++++++++++++++++++++++++
| 2 files changed, 88 insertions(+), 51 deletions(-)
| create mode 100644 src/Service/EloquaApiClientInterface.php
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 3deaec6..0ddf270 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

6 out of 6 hunks ignored

patching file b/src/Service/EloquaApiClientInterface.php
can't find file to patch at input line 689
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From f2c26b6795e7dfeef59bed31e62b0b36c84fe567 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 17:13:41 -0700
|Subject: [PATCH 6/7] Fix tests after renaming functions
|
|---
| tests/src/Unit/EloquaApiClientTest.php | 29 +++++++++++++++++++-------
| 1 file changed, 21 insertions(+), 8 deletions(-)
|
|diff --git a/tests/src/Unit/EloquaApiClientTest.php b/tests/src/Unit/EloquaApiClientTest.php
|index 789249a..4a0e9f2 100644
|--- a/tests/src/Unit/EloquaApiClientTest.php
|+++ b/tests/src/Unit/EloquaApiClientTest.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

6 out of 6 hunks ignored
can't find file to patch at input line 796
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 9aa3a88bd8845f5cb0d7b8748d4d90dfa49762dc Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 17 Apr 2024 17:21:12 -0700
|Subject: [PATCH 7/7] Update method annotations
|
|---
| src/Service/EloquaApiClient.php | 4 ++--
| 1 file changed, 2 insertions(+), 2 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 0ddf270..ab318a6 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

2 out of 2 hunks ignored

patch '-p2' --no-backup-if-mismatch -d '/var/www/html/web/modules/contrib/eloqua_api_redux' < '/tmp/662a79c8ba0ee.patch'
can't find file to patch at input line 19
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 8c963fca6a746538b58f2a7b79242cc8d01924f1 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:25:59 -0700
|Subject: [PATCH 1/7] Move tokens from config to state
|
|---
| eloqua_api_redux.post_update.php | 32 ++++++++++++
| eloqua_api_redux.services.yml    |  2 +-
| src/Form/Settings.php            | 25 +++++++--
| src/Service/EloquaApiClient.php  | 90 +++++++++++++++++++-------------
| 4 files changed, 108 insertions(+), 41 deletions(-)
| create mode 100644 eloqua_api_redux.post_update.php
|
|diff --git a/eloqua_api_redux.post_update.php b/eloqua_api_redux.post_update.php
|new file mode 100644
|index 0000000..68d24bc
|--- /dev/null
|+++ b/eloqua_api_redux.post_update.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 56
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/eloqua_api_redux.services.yml b/eloqua_api_redux.services.yml
|index ffd09b4..3d75791 100644
|--- a/eloqua_api_redux.services.yml
|+++ b/eloqua_api_redux.services.yml
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored
can't find file to patch at input line 69
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Form/Settings.php b/src/Form/Settings.php
|index 4c71511..7c1da72 100644
|--- a/src/Form/Settings.php
|+++ b/src/Form/Settings.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

6 out of 6 hunks ignored
can't find file to patch at input line 143
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 0658d9f..461ff95 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

12 out of 12 hunks ignored
can't find file to patch at input line 364
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 56e5bfc322fd3130a99ae7b8b170c02905a463a3 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:26:16 -0700
|Subject: [PATCH 2/7] Fix phpstan comparisons
|
|---
| src/Service/EloquaApiClient.php | 8 ++++----
| 1 file changed, 4 insertions(+), 4 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 461ff95..816a3ec 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

2 out of 2 hunks ignored
can't find file to patch at input line 406
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 3996aafeaf623991b46694843f3e4f767dad0243 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:37:34 -0700
|Subject: [PATCH 3/7] Fix phpstan empty() errors
|
|---
| src/Service/EloquaApiClient.php | 9 +++++----
| 1 file changed, 5 insertions(+), 4 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 816a3ec..3deaec6 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

4 out of 4 hunks ignored

The next patch would delete the file install/eloqua_api_redux.tokens.yml,
which does not exist!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.

1 out of 1 hunk ignored
can't find file to patch at input line 485
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 648841879314e6bec1983819d9dae955d3f4b5df Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 17:04:30 -0700
|Subject: [PATCH 5/7] Add EloquaApiClientInterface
|
|---
| src/Service/EloquaApiClient.php          | 57 ++--------------
| src/Service/EloquaApiClientInterface.php | 82 ++++++++++++++++++++++++
| 2 files changed, 88 insertions(+), 51 deletions(-)
| create mode 100644 src/Service/EloquaApiClientInterface.php
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 3deaec6..0ddf270 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

6 out of 6 hunks ignored

patching file Service/EloquaApiClientInterface.php

can't find file to patch at input line 689
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From f2c26b6795e7dfeef59bed31e62b0b36c84fe567 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 17:13:41 -0700
|Subject: [PATCH 6/7] Fix tests after renaming functions
|
|---
| tests/src/Unit/EloquaApiClientTest.php | 29 +++++++++++++++++++-------
| 1 file changed, 21 insertions(+), 8 deletions(-)
|
|diff --git a/tests/src/Unit/EloquaApiClientTest.php b/tests/src/Unit/EloquaApiClientTest.php
|index 789249a..4a0e9f2 100644
|--- a/tests/src/Unit/EloquaApiClientTest.php
|+++ b/tests/src/Unit/EloquaApiClientTest.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

6 out of 6 hunks ignored
can't find file to patch at input line 796
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 9aa3a88bd8845f5cb0d7b8748d4d90dfa49762dc Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 17 Apr 2024 17:21:12 -0700
|Subject: [PATCH 7/7] Update method annotations
|
|---
| src/Service/EloquaApiClient.php | 4 ++--
| 1 file changed, 2 insertions(+), 2 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 0ddf270..ab318a6 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

2 out of 2 hunks ignored

patch '-p4' --no-backup-if-mismatch -d '/var/www/html/web/modules/contrib/eloqua_api_redux' < '/tmp/662a79c8ba0ee.patch'
can't find file to patch at input line 19
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 8c963fca6a746538b58f2a7b79242cc8d01924f1 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:25:59 -0700
|Subject: [PATCH 1/7] Move tokens from config to state
|
|---
| eloqua_api_redux.post_update.php | 32 ++++++++++++
| eloqua_api_redux.services.yml    |  2 +-
| src/Form/Settings.php            | 25 +++++++--
| src/Service/EloquaApiClient.php  | 90 +++++++++++++++++++-------------
| 4 files changed, 108 insertions(+), 41 deletions(-)
| create mode 100644 eloqua_api_redux.post_update.php
|
|diff --git a/eloqua_api_redux.post_update.php b/eloqua_api_redux.post_update.php
|new file mode 100644
|index 0000000..68d24bc
|--- /dev/null
|+++ b/eloqua_api_redux.post_update.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored
can't find file to patch at input line 56
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/eloqua_api_redux.services.yml b/eloqua_api_redux.services.yml
|index ffd09b4..3d75791 100644
|--- a/eloqua_api_redux.services.yml
|+++ b/eloqua_api_redux.services.yml
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored
can't find file to patch at input line 69
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Form/Settings.php b/src/Form/Settings.php
|index 4c71511..7c1da72 100644
|--- a/src/Form/Settings.php
|+++ b/src/Form/Settings.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

6 out of 6 hunks ignored
can't find file to patch at input line 143
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 0658d9f..461ff95 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

12 out of 12 hunks ignored
can't find file to patch at input line 364
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 56e5bfc322fd3130a99ae7b8b170c02905a463a3 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:26:16 -0700
|Subject: [PATCH 2/7] Fix phpstan comparisons
|
|---
| src/Service/EloquaApiClient.php | 8 ++++----
| 1 file changed, 4 insertions(+), 4 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 461ff95..816a3ec 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

2 out of 2 hunks ignored
can't find file to patch at input line 406
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 3996aafeaf623991b46694843f3e4f767dad0243 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:37:34 -0700
|Subject: [PATCH 3/7] Fix phpstan empty() errors
|
|---
| src/Service/EloquaApiClient.php | 9 +++++----
| 1 file changed, 5 insertions(+), 4 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 816a3ec..3deaec6 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

4 out of 4 hunks ignored
can't find file to patch at input line 462
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 2aab2b832ea576c8d293e97816d7a481ff81acbc Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 16:44:32 -0700
|Subject: [PATCH 4/7] Remove deprecated config install file
|
|---
| config/install/eloqua_api_redux.tokens.yml | 3 ---
| 1 file changed, 3 deletions(-)
| delete mode 100644 config/install/eloqua_api_redux.tokens.yml
|
|diff --git a/config/install/eloqua_api_redux.tokens.yml b/config/install/eloqua_api_redux.tokens.yml
|deleted file mode 100644
|index 7ebecb4..0000000
|--- a/config/install/eloqua_api_redux.tokens.yml
|+++ /dev/null
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored
can't find file to patch at input line 485
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 648841879314e6bec1983819d9dae955d3f4b5df Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 17:04:30 -0700
|Subject: [PATCH 5/7] Add EloquaApiClientInterface
|
|---
| src/Service/EloquaApiClient.php          | 57 ++--------------
| src/Service/EloquaApiClientInterface.php | 82 ++++++++++++++++++++++++
| 2 files changed, 88 insertions(+), 51 deletions(-)
| create mode 100644 src/Service/EloquaApiClientInterface.php
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 3deaec6..0ddf270 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

6 out of 6 hunks ignored
can't find file to patch at input line 589
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Service/EloquaApiClientInterface.php b/src/Service/EloquaApiClientInterface.php
|new file mode 100644
|index 0000000..e9641d2
|--- /dev/null
|+++ b/src/Service/EloquaApiClientInterface.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

1 out of 1 hunk ignored
can't find file to patch at input line 689
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From f2c26b6795e7dfeef59bed31e62b0b36c84fe567 Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 10 Apr 2024 17:13:41 -0700
|Subject: [PATCH 6/7] Fix tests after renaming functions
|
|---
| tests/src/Unit/EloquaApiClientTest.php | 29 +++++++++++++++++++-------
| 1 file changed, 21 insertions(+), 8 deletions(-)
|
|diff --git a/tests/src/Unit/EloquaApiClientTest.php b/tests/src/Unit/EloquaApiClientTest.php
|index 789249a..4a0e9f2 100644
|--- a/tests/src/Unit/EloquaApiClientTest.php
|+++ b/tests/src/Unit/EloquaApiClientTest.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

6 out of 6 hunks ignored
can't find file to patch at input line 796
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|-- 
|GitLab
|
|
|From 9aa3a88bd8845f5cb0d7b8748d4d90dfa49762dc Mon Sep 17 00:00:00 2001
|From: Will Hartmann <will.hartmann@vtpventures.com>
|Date: Wed, 17 Apr 2024 17:21:12 -0700
|Subject: [PATCH 7/7] Update method annotations
|
|---
| src/Service/EloquaApiClient.php | 4 ++--
| 1 file changed, 2 insertions(+), 2 deletions(-)
|
|diff --git a/src/Service/EloquaApiClient.php b/src/Service/EloquaApiClient.php
|index 0ddf270..ab318a6 100644
|--- a/src/Service/EloquaApiClient.php
|+++ b/src/Service/EloquaApiClient.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

2 out of 2 hunks ignored

   Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/eloqua_api_redux/-/merge_requests/5.patch

In Patches.php line 331:
                                                                               
  [Exception]                                                                  
  Cannot apply patch 3440052: Move Ephemeral Token Data Out of Config and Int  
  o State (https://www.drupal.org/project/eloqua_api_redux/issues/3440052) (h  
  ttps://git.drupalcode.org/project/eloqua_api_redux/-/merge_requests/5.patch  
  )!                                                                           
                                
πŸ‡ΊπŸ‡ΈUnited States erindarri

Tested and confirmed this does what it says on the tin.

The actual error I got was:

doTokenRequest() error: Client error: `POST https://login.eloqua.com/auth/oauth2/token` resulted in a `400 Bad Request` response: {"error":"invalid_grant","error_description":"The refresh token is incorrect, malformed, expired, or has been invalidate (truncated...)

But this is fine enough for me.

πŸ‡ΊπŸ‡ΈUnited States erindarri

I can't believe I've been using this module for seven years, frustrated with not being able to map composite fields, and hadn't seen this patch. Tested against 2.0.0 and this does what I expect: See a list of composite field elements with their children, available for selection.

Bumping this for consideration for MR.

πŸ‡ΊπŸ‡ΈUnited States erindarri

Commenting on this to get it back into the current issues.

I would love this functionality. I also have to replicate submissions in order for them to resend to Eloqua. I have many forms that have multiple functionalities, including emailing to various people on submission. I have to be creative about how I replicate webform submissions in order to not spam them.

The other place I would envision this being implemented would be in the Resend tab, along with the email resends.

πŸ‡ΊπŸ‡ΈUnited States erindarri

I like the proactivity of providing the link to validate the API key and secret and to refresh the token when the API connection is broken for whatever reason. I don't know if this is a typical user experience, but I find it cumbersome for a few reasons:

  1. It would be nice to see this information in the summary in the handler listing if possible
  2. By the time I've gotten to this page and see that there are no forms selected, I know that there is an issue with the API connection.
  3. It is nice that there is a link to get to the API connection page, but isn't really saving me that much effort.

Is it possible to combine this with MR !7 ✨ Show Eloqua Form Name in Webform Handler Summary Needs review so that the notice is in the summary? Perhaps the link to the API settings could be here, too, if the token is missing.

πŸ‡ΊπŸ‡Έ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.

Production build 0.71.5 2024