Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | error_on_machine_name-3021126-2.patch | 495 bytes | RumyanaRuseva |
Comments
Comment #2
RumyanaRuseva CreditAttribution: RumyanaRuseva at FFW commentedHere is a patch.
Comment #3
TR CreditAttribution: TR commentedYes. 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...
Comment #5
pifagorComment #6
pifagorDone