Problem/Motivation

When editing an existing vote type, the machine name field is editable, but it results in an error on save:
The machine name of the `Vote Type` bundle cannot be changed

Proposed resolution

Change the form element to be disabled if editing existing vote type.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RumyanaRuseva created an issue. See original summary.

RumyanaRuseva’s picture

TR’s picture

Status: Needs review » Reviewed & tested by the community

Yes. this is needed. A retest shows the patch still applies and passes the test.

The patch uses the commonly-used pattern of !isNew() to disable the machine_name field and prevent it from being edited. See for example
https://api.drupal.org/api/drupal/core%21modules%21media%21src%21MediaTy...

  • pifagor committed 23e2782 on 8.x-3.x authored by RumyanaRuseva
    Issue #3021126 by RumyanaRuseva, pifagor, TR: Error on machine name...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed
pifagor’s picture

Done

Status: Fixed » Closed (fixed)

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