I edited my node, unchecked the `Generate automatic URL alias` checkbox, and typed my custom URL into the path box and clicked save.

This is the value I typed: `blog/blog.cfm/aid/496/Test-url-alias`

I don't get any errors when I save, When I edit the node again and go look at the URL alias the `Generate automatic URL alias` checkbox is checked again. My value is still in the text field, but the field is disabled because the checkbox is checked meaning it should use an automatic alias in the next save or update.

Comments

leopathu created an issue. See original summary.

leopathu’s picture

File : PathAutoState.php line no: 49

if ($this->value === NULL) {
        $entity = $this->parent->getEntity();
        $pattern = \Drupal::service('pathauto.generator')->getPatternByEntity($entity);
        $this->value = !empty($pattern) ? static::CREATE : static::SKIP;
}

here is the bug.. the state value is storing wrongly with that. even if user unchecked the checkbox the value static:CREATE is storing in the keyvalue storage if pattern is not empty.

leopathu’s picture

Assigned: leopathu » Unassigned
nejcramsak’s picture

Hi @leopathu i tested this on the latest version and the development version and i got the correct behaviour on both, when i saved the content the checkbox stayed unchecked. Could you add more detail as to how this happened?

Berdir’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)
igork96’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Can't reproduce it, feel free to reopen it if there is additional info.