Set default bundle for site

Created on 23 August 2016, over 8 years ago
Updated 3 July 2023, over 1 year ago

Problem/Motivation

During the development of a site, developers should almost always use the same custom bundle to export features related to that site. This means that every time they export a feature (at least between sessions) they have to make sure to manually select the correct bundle.

Steps to reproduce

  1. Create a new bundle and select it in the "Bundle" field on the features overview page (/admin/config/development/features).
  2. When you re-login and go to the features overview page then you should see that created bundle is still selected.

Proposed resolution

One option would be if the "default" bundle could be saved as a config value. Note that this is not the "default" bundle that's provided out of the box by Features, but rather the ability to set any bundle as the default bundle.

However, there are issues with that approach. We currently store the default bundle in a session variable. If we add a new default setting to features.settings, we have to map out the interaction between the session variable and the new setting. Also, we have to set the initial value to default (since, in Features itself, we can't count on any other value being present).

Alternatives:

  • When a new features bundle is installed, set it as the current bundle in the session. Downside: this will work only for the user who installed the bundle.
  • Move the current bundle out of the session and instead use a state setting. Downside: all users would have the same default bundle.

Instead:

  • Use state (per the state API) in addition to the session to store the current bundle. First check session, then state, and if both are empty then fall back to default.
  • When a new feature bundle is installed, set it in the state.
✨ Feature request
Status

Needs review

Version

5.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States dane powell

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024