- Issue created by @mlncn
- ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
This fixes it but no i have no idea why it would be broken in the first place.
Noticed when making this patch i do still have a core patch in the vicinity: "Path module calls getInternalPath without checking if the url is routed #3342398": "https://git.drupalcode.org/project/drupal/-/merge_requests/9209.diff", from ๐ Path module calls getInternalPath without checking if the url is routed Active but it does not look like it intersects.
Likewise looked at #2484411: Manual path aliases are not the same as aliases on the node form โ but could not see a connection.
Meant to mention the site has no multilingual or translation set up at all (at least not currently, it is possible it did at one point long ago and they were disabled) so ๐ If you don't want to translate your URL alias, the original URL alias won't work with your translations Needs work should not be the issue.
Also meant to mention explicitly that this does not pose a problem as long as automatic aliases are turned on; our internal tracking issue once we realized the problem was not, say, a contact form no longer existing, only losing its alias, went from being titled "Issue with URL Alias" to "Content that had a manual (rather than automatic) URL alias has no alias shown in the form when edited, so on save the alias is lost" with the deathless description "Manual URL Alias are being forgotten.".
- ๐บ๐ธUnited States smustgrave
Should be in an MR and will need test coverage but MR will show if it broke anything.
- ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
Thanksโ i had followed the issue fork commands to make https://git.drupalcode.org/issue/drupal-3535695/-/tree/3535695-url-alias...
But when i went to submit the merge request, it said 178 commits, 0 changes, so that means i did something wrong and need to try again, yes?
- Merge request !12968Issue #3535695 by mlncn: Ensure URL alias set for edit field & validation if exists in values โ (Open) created by mlncn
- ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
This problem of the Drupal\pathauto\PathautoItem object (contrib, i know, but it extends Drupal\path\Plugin\Field\FieldType\PathItem with minimal changes not relevant here) having an alias property of NULL is also an issue for validation even when automatic aliases are enabled.
The updated workaround/fix is now in a brand new branch with a merge request that has only what it should have.
Still do not know how the alias property can end up NULL in the first place โ when the values array has the alias correctly in the very same object โ so not sure how to add a test, but the fact that all existing tests pass indicates that it is a harmless failsafe.
- ๐บ๐ธUnited States smustgrave
Think we will still need steps and a test. We donโt want to mask a larger problem