Closed (fixed)
Project:
Webform Mailchimp
Version:
8.x-5.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2017 at 15:32 UTC
Updated:
1 Feb 2018 at 15:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
miro_dietikerFrom the current tests i don't think we should omit caches.
Already now, when opening the handler edit dialog it takes long.
We whould try to quickly load initially and offer optional update.
Major because stale caches can result in wrong selections and unexpected (currently pretty silent) submission handler fails.
Comment #3
miro_dietikerDid some setups in production and it was pretty annoying.
The only action that made newly created MailChimp groups show up when editing the handler was a global Cache clear...
Users without superadmin permissions won't be able to handle such a situation.
Comment #4
primsi commentedInitial patch for this.
Wrapped the button in a fieldset that a description can be provided. Also it seems that we don't need to clear the cache manually because mailchimp_get_lists() can do that.
From what I tested all relevant stuff is populated with new data. Not sure if I missed something.
Comment #5
miro_dietikerYou write that groups are retrieved separately and not cached. However i reported this isssue because when a new group is added on mailchimp side, even reloading the form edit / handler overview and reclicking the handler edit Button didn‘t help to make the new group show up.
Maybe the new code updating the list implicitly also updated the groups? Plt double check.
Comment #6
miro_dietikerThis seems to me like unclean empty options handling:
The empty option key should be present and this should not be an regular options value. Also especially not of selection is required.
Comment #7
primsi commentedI've re-checked the group part: the interest groups part is built by mailchimp_interest_groups_form_elements() which doesn't have any caching mechanism. Also tested it manually by renaming and adding a group on Mailchimp.
Also moved the logic to the submit handler following Berdirs suggestion, and corrected other missing #empty_option
Comment #8
primsi commentedComment #9
miro_dietikerThis update / cache clear is only needed to make these things show up:
* New lists
* New group categories
Thus, let's put the button on the same line as the list selection.
Name it
* Refresh lists & groups
We don't need any explanation, details element or any description IMHO.
Changes are that the wrapping can be done by attaching some wrapper / inline classes - Berdir said ;-)
Comment #10
primsi commented- removed the group
- renamed button
- moved button
Comment #12
miro_dietikerAwesome, committed.
More UI improvements like horizontal wrapping in follow-ups.