Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Can we have Pathauto try and generate a unique variant of the alias in cases where the alias generated conflicts with an existing callback function? Is there a reason why Pathauto treats this kind of conflict differently that conflicts with existing aliases?
I'd be willing to attempt writing a patch for this if it makes sense to the community.
Comment | File | Size | Author |
---|---|---|---|
#4 | callback-conflict-variant-1316976.patch | 2.15 KB | nmc |
Comments
Comment #1
Dave ReidI'm not sure I quite understand? Could you expand on this?
Comment #2
nmc CreditAttribution: nmc commentedThere are at least two cases where an alias may be in conflict. Example: when trying to create the alias
domain.com/hello-world
In case 1, pathauto tries to generate a variant (
domain.com/hello-world-0
), but in case 2, pathauto does not try to generate a variant. I'd like pathauto to be able to generate a variant for case 2 as well.Comment #3
Dave ReidOk thanks, that is helpful. I see what the problem is now.
Comment #4
nmc CreditAttribution: nmc commentedAttached is the patch....
Comment #6
hgoto CreditAttribution: hgoto as a volunteer commentedProbably this issue has been resolved in the following issue.
#1909370: Allow other modules to chime in when checking if a to-be-generated alias is already reserved
(I'm not confident and don't change the status.)