if ($modx->db->getValue("SELECT count(*) FROM " . $tblsc . " WHERE id<>'$id' AND alias='$alias'") != 0) {
$cnt = '1';
$tempAlias = $alias;
while ($modx->db->getValue("SELECT count(*) FROM " . $tblsc . " WHERE id<>'$id' AND alias='$tempAlias'") != 0) {
$tempAlias = $alias;
$tempAlias .= $cnt;
$cnt++;
}
$alias = $tempAlias;
}
(pagetitle -> pagetitle1 -> pagetitle1 -> pagetitle1 ...)
Then,
I think the code to fix it does not include the code to turn the behavior by the configuration of 'Allow or Do not allow duplicate aliases'.
So even if we would choose 'Do not allow duplicate aliases', the alias would be duplicated.
I also hope this bug would be fixed.