2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
$form['path']['alias']=array('#type'=>'textfield','#default_value'=>$node->path,'#size'=>60,'#maxlength'=>250,'#collapsible'=>TRUE,'#collapsed'=>TRUE,'#description'=>t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
$form['path']['path']=array('#type'=>'textfield','#default_value'=>$node->path,'#size'=>60,'#maxlength'=>250,'#collapsible'=>TRUE,'#collapsed'=>TRUE,'#description'=>t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
if($node->path){
$form['path']['pid']=array('#type'=>'hidden','#value'=>db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'",$node->path)));
$form['path']['alias']=array('#type'=>'textfield','#default_value'=>$node->path,'#size'=>60,'#maxlength'=>250,'#collapsible'=>TRUE,'#collapsed'=>TRUE,'#description'=>t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
$form['path']['path']=array('#type'=>'textfield','#default_value'=>$node->path,'#size'=>60,'#maxlength'=>250,'#collapsible'=>TRUE,'#collapsed'=>TRUE,'#description'=>t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
if($node->path){
$form['path']['pid']=array('#type'=>'hidden','#value'=>db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'",$node->path)));