- Issue created by @pameeela
- ๐ฆ๐บAustralia pameeela
This may warrant a change in the Mailchimp module, but I am concerned if many contrib modules will require an update to work at all, that we need a generic solution.
- ๐ฉ๐ชGermany jurgenhaas Gottmadingen
We've seen a few edge cases in the last 18 months when we had to add special cases for sticky action buttons. Maybe this is another one. I can have a look, potentially Friday. I wouldn't be too worries about a wider impact, as we have addressed this in general and sometimes specifically.
- ๐ฆ๐บAustralia pameeela
OK, sounds good. Glad to hear that it is marginal.
- ๐ฉ๐ชGermany jurgenhaas Gottmadingen
Unfortunately, we can't add a workaround for this in Gin. The action button in Mailchimp is not done in a way that matches conventions that are used in Core and most contrib: the submit button needs to be of type
submit
and should be a child of$form['actions']
. I'm moving this to the mailchimp project and propose the fix in an MR. - Merge request !105Issue #3534999 by pameeela, jurgenhaas: Submit button missing on Mailchimp authentication form โ (Merged) created by jurgenhaas
- ๐ฎ๐ณIndia arunsahijpal
Hi @jurgenhaas,
I was able to reproduce this issue and after the MR the issue is resolved.
Attaching ss for reference.
Hence moving it to RTBC.Thanks,
Arun - First commit to issue fork.
-
xenophyle โ
committed 41ba6e70 on 3.x authored by
jurgenhaas โ
Issue #3534999 by jurgenhaas, pameeela, arunsahijpal: Submit button...
-
xenophyle โ
committed 41ba6e70 on 3.x authored by
jurgenhaas โ
-
xenophyle โ
committed b30fe779 on 2.x authored by
jurgenhaas โ
Issue #3534999 by jurgenhaas, pameeela, arunsahijpal: Submit button...
-
xenophyle โ
committed b30fe779 on 2.x authored by
jurgenhaas โ
- ๐ช๐ธSpain fjgarlin
Commenting on this issue as it is the latest that was fixed.
It would be great to create a new stable release that includes all the issues that were fixed since 3.0.0 was tagged.
The diff can be seen here: https://git.drupalcode.org/project/mailchimp/-/compare/3.0.0...3.x?from_... - ๐บ๐ธUnited States drumm NY, US
I think this may have caused a regression. https://git.drupalcode.org/project/mailchimp/-/blob/b30fe779aed8ed253934... targets
formWrapper.querySelector('#edit-actions')
But the ID is now
edit-submit
- ๐ฆ๐บAustralia pameeela
Hmm, yes this form is a bit more complicated because of the status processing. Right now on 3.0.1, the button appears twice, once in the top bar and once inside the form. The top bar button submits the form but doesn't initiate the OAuth. The button in the form does, but then when you come back to the form, it doesn't update as expected based on the status (see screenshot, it just keeps spinning). There are a couple of JS errors in the console too.
- ๐บ๐ธUnited States xenophyle
@pameeela If you make the edit suggested by @drumm and clear cache, does that fix it for you? It works for me, but I never saw the extra button at the top either way.
- ๐บ๐ธUnited States drumm NY, US
Iโve confirmed that MR !107 does resolve the issue for us. I was able to complete OAuth setup with MailChimp. I havenโt done testing beyond that, like handling error states or Re-Authenticate.
I never saw the extra button at the top, although it is in a place I could see myself not noticing. We are using Claro for the admin theme.
- First commit to issue fork.
- ๐ฆ๐บAustralia fenstrat Australia
Confirming MR!107 fixes the issue, also on Claro here.
However I think it'd make more sense to target the .form-submit class rather than a seemingly more brittle id of the button. I've pushed a change to that effect.
- ๐บ๐ธUnited States xenophyle
After a longer look at this I see a couple problems:
- The mismatched selector for the button in authentication.js
- The button being moved up to the top of the page in some casesA certain setting for the Gin theme moves the button to the top of the page. For this to work correctly, the button array needs to be fixed:
$form['actions']['#type'] = 'actions'; $form['actions']['submit'] = [ '#type' => 'submit', '#value' => $button_action, '#ajax' => [ 'callback' => '::authenticate', ], '#suffix' => "<span class='spinner'></span>", ];
The selector is harder because the button being relocated makes it inconsistent where to look for it. I can update the JS to look both in the form and at the top of the page, but what if another admin theme puts the button in a third location?
For now I will update the code assuming this 3rd case won't happen, but it could.
-
xenophyle โ
committed 6a0a6742 on 3.x
Issue #3534999 by drumm, jurgenhaas, xenophyle, fenstrat, pameeela,...
-
xenophyle โ
committed 6a0a6742 on 3.x
- ๐บ๐ธUnited States xenophyle
I've tested this pretty thoroughly and I'm marking it as fixed but would appreciate if anyone wants to test 3.x-dev before I make a new release, which I hope to do no later than tomorrow.
-
xenophyle โ
committed 109154c2 on 2.x
Issue #3534999 by drumm, jurgenhaas, xenophyle, fenstrat, pameeela,...
-
xenophyle โ
committed 109154c2 on 2.x
- ๐ฆ๐บAustralia pameeela
@xenophyle good stuff, confirming this works for me. We shouldn't need to worry about any other admin themes, there is a plan for Gin to be adopted by core โ and then discourage development of new admin themes, so we can standardise our efforts.
Automatically closed - issue fixed for 2 weeks with no activity.