Problem/Motivation

If a flag is disabled, and then edited, upon saving, the flag is re-enabled.

Proposed resolution

Leave the flag in its existing state when saving.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom created an issue. See original summary.

jhedstrom’s picture

Status: Active » Needs review
FileSize
1.07 KB

Pretty straightforward fix. This moves the enable logic just to the add form.

martin107’s picture

Status: Needs review » Reviewed & tested by the community

This makes sense to me,

It is one of those obvious bugs - that makes me smile- once you see it.

My only comments get pushed to a side issue ... we have duplicate definitions in the FlagInterface

#2818353: Remove redundant enable() and disable() from FlagInterface

  • joachim committed 1a1983e on 8.x-4.x authored by jhedstrom
    Issue #2818077 by jhedstrom: Fixed editing a disabled flag re-enables it...
joachim’s picture

Status: Reviewed & tested by the community » Fixed

Committed! Thanks for the patch and review.

Berdir’s picture

This could actually be done an API level too, simply by setting $this->status to TRUE by default, it will be overriden by the actual value when an existing entity is loaded.

martin107’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.