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.
hi,
I use the custom page for commerce product page,
custom page path = product/%product
pathauto alias= /product/%product:title
currently when I visit /product/product-title-1 for the first time it will display page not found message
the visitiing /product/1 is required for the alias gererated.
I want after a product is created, user will be able to visit directly to the pathauto alias at /product/product-title-1
Comments
Comment #1
MustangGB CreditAttribution: MustangGB commentedThese really need to be created when content is added, otherwise you end up with unaliased url's all over the place.
Comment #2
Exploratus CreditAttribution: Exploratus commentedI agree. Makes it pretty unusable. Would be great if the alias would be generated on the page manager edit page save.
Comment #3
geek-merlinin fact - apart from initial bulk generation - alias generation should be on product save via hook_entity_save() and friends (like pathauto does).
as the module author stated on the module page he chose not to do so:
I chose not to depend on entity insert/update/delete calls for this stuff as it could require literally hundreds or thousands of aliases to be generated with a single button click and that's simply not acceptable.
i guess adding that will take under a day and as soon as i get to it i'll implement it.
Comment #4
Exploratus CreditAttribution: Exploratus commentedWould be amazing!!!!
If we do not execute on node save, then when one changes a node name / title of a node, the dependent page manager page(s) still maintain the old url. One would have to go to the database manually and delete / or run drush to reupdate every time. Sounds very anti dynamic. Nut drupally.. :)
Comment #5
Exploratus CreditAttribution: Exploratus commentedHi. I would be willing to pony up $50 as a contribution to whoever can get related aliases generated when a node is saved. Ideally, I think the behavior should be that if we have a page with a context to node id, when we save that node, the url aliases for the related page managers pages having that context id would be created / updated.
So if I have:
node/12 (building/whatever
it regenerates (example):
node/12/for-sale (building/whatever/for-sale)
node/12/for-rent (building/whatever/for-rent)
Here is to hoping we can get this going, as I think this adds tremendous functionality by providing clean urls for page manager pages (w/ context) which so many of us use.
Cheers!