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.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | name-validation-template-key-fails-2843009-3.patch | 1.78 KB | scott_euser |
SiteSettingsConfigForm_machine_name.patch | 1.55 KB | Rene Bakx |
Comments
Comment #2
scott_euser CreditAttribution: scott_euser commentedNice, good find! I will try to get that released asap.
Thanks,
Scott
Comment #3
scott_euser CreditAttribution: scott_euser commentedSeems 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.
Comment #5
scott_euser CreditAttribution: scott_euser commentedComment #7
Rene BakxMarking this as closed fixed. Really flabbergasted by your quick action and release :)
Thank you!