Validation of the machine name flags a valid machine name on admin/config/site-settings/config breaks on the default key because the preg_replace return an empty string (for good order, running PHP 7.0.13)

However if you remove the entire validate form method in site_settings/src/Form/SiteSettingsConfigForm.php and replace the #type of the template_key from textfield into machine_name it works perfectly.

Attached a quick patch created with phpstorm

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Rene Bakx created an issue. See original summary.

scott_euser’s picture

Nice, good find! I will try to get that released asap.

Thanks,
Scott

scott_euser’s picture

Seems like that machine_name on it's own throws an error as machine name validation seems to expect a machine name exists callback. I've followed the patch here to add that to the attached patch. Will release this shortly.

  • scott_euser committed 4dc3c3e on 8.x-1.x
    Issue #2843009 by rene-bakx, scott_euser: Name validation of Template...
scott_euser’s picture

Status: Active » Fixed

  • scott_euser committed cd96415 on 8.x-1.x
    Issue #2843009 by Rene Bakx, scott_euser: Name validation of Template...
Rene Bakx’s picture

Status: Fixed » Closed (fixed)

Marking this as closed fixed. Really flabbergasted by your quick action and release :)

Thank you!