In one of my works, I want to programmatically uncheck the checkbox option of 'Generate automatic URL alias' for a specific node editing form. For this, I have created the following form alter for the content type. I have added a custom after-build function for the necessary content type in the form alter.
URL Alias
In Drupal 8, variable_set() and variable_get() is deprecated. The variables database table in Drupal 7 is now removed in Drupal 8, and is replaced with config table. We can create a variable while installing the module using MODULE.setting.yml and MODULE.schema.yml files.
Check out the steps to create a custom token in Drupal for setting the URL alias pattern.
A Drupal user using running a Drupal website in another language encountered a situation where the Double-quote (“) character is retained in the URL aliases generated by the Drupal Pathauto module. If you happen to be running a Drupal website in a language other than English and encountering such characters in the alias generated by the Drupal Pathauto module then proceed down below to know the solution.