Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config not updated when it has mixed levels #23

Closed
ryanmitchell opened this issue Jul 17, 2023 · 2 comments · Fixed by #24
Closed

Config not updated when it has mixed levels #23

ryanmitchell opened this issue Jul 17, 2023 · 2 comments · Fixed by #24

Comments

@ryanmitchell
Copy link

We are using this library in the Statamic Mailchimp add-on, but there is an issue when saving the config: statamic-rad-pack/mailchimp#100

The issue seems to be coming from these lines in ConfigUpdater - in our case we are passing an array of mixed levels (some with no children, some with children) and it only returns those with children.

If I comment those lines out, updating work fine.

Our code is pretty simple: ConfigWriter::writeMany('mailchimp', $data);

Are we doing something wrong, or is it a bug?

@JohnathonKoster
Copy link
Contributor

JohnathonKoster commented Jul 19, 2023

This will take some time to review and fully debug, and see if a solution can be found. The highlighted lines cannot be removed with the way things are currently implemented.

@ryanmitchell
Copy link
Author

Appreciate you looking into it - if you need anything else from me just let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants