Machine name element was added to core, which has basically same functionality as custom js + textfield element that currently use. It's should be less code/maintenance to use machine_name and likely best practices.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

Category: feature » bug
Priority: Minor » Normal

Upping this to a bug, as the implementation in Features is broken:

1. Start typing a module name
2. Click to edit the machine name yourself
3. Enter your own machine name
4. Go back and change the module name
5. The JS clobbers what you typed in the machine name with the updated human name text.

This is not the same behaviour as core's element.

joachim’s picture

Status: Active » Needs review
FileSize
4.67 KB
mpotter’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Needs work

Let's see if we can get this re-rolled and tested for the 2.x branch.

mpotter’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1259362.features.machine-name-core-element.patch, failed testing.

undertext’s picture

Status: Needs work » Needs review
FileSize
5.02 KB

Reroll

joachim’s picture

Issue summary: View changes

Looks good to me, though as it was originally my patch I don't think I can RTBC...

torotil’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks good and it works fine for me. Used this to fix a weird bug with the machine-name field always being submitted empty (although it had a valid value).

  • Commit 9f793f1 on 7.x-2.x authored by joachim, committed by hefox:
    Issue #1259362 by joachim, undertext: Use machine_name element that's...
hefox’s picture

Status: Reviewed & tested by the community » Fixed

Thanks

Status: Fixed » Closed (fixed)

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