Just reporting this phenomenon, in case there should be an update function or just to help anyone else hit with this.

I'm updating a development clone of a site from late August's core and simplenews to Drupal 8 RC1. After the update, subscription forms lack any newsletter checkboxes.

Poked through the debugger enough to determine that the entity query performed for simplenews_subscriber entities by the subscriptions field had target_bundles set to an empty array, which always causes entity queries to return nothing.

I fixed this by manually editing the configuration for the subscriptions field to set target_bundles: null rather than target_bundles: { }

I then checked the subscriptions field configuration on the production site (so running an older Drupal core) and found target_bundles: { } is set. So presumably the change was entity queries' handling of empty arrays as target_bundles.

Worth an update function to fix this config?

Comments

mbaynton created an issue. See original summary.

Berdir’s picture

I've already fixed our default config as we had broken tests because of this.

We don't support an upgrade path yet, it is just a dev version, so I'm not sure about starting to add update functions. As soon as we have one, we'll need to add others too.

We currently have 20-30 usages of the module, quite a few of those are likely our own (which we'll need to write an update function for anyway). Not much but actually more than I'd expected.

If you want to work on an update function then I'd probably include it. Also want to discuss with miro about doing an alpha release.

mbaynton’s picture

@Berdir, Nah, I'll just hope the one other person an update function would help will come across this issue :) Thanks for the context.

Berdir’s picture

Status: Active » Closed (won't fix)

Closing this, as it was a pretty long time ago, I guess anyone who needed this found it by now.