There's currently not any generic way of rewriting entity URLs when using domain_source. Initial recommendation would be to have domain_entity_source implement hook_domain_source_path_alter() and invoke drupal_alter() calls to entity types with domain access enabled.

Comments

greenSkin created an issue. See original summary.

greenskin’s picture

Status: Active » Needs review
StatusFileSize
new1.6 KB

Here's a patch for review. This allows entity type modules to implement hook_domain_source_ENTITY_TYPE_path_alter() (where "ENTITY_TYPE" would be a domain access allowed entity type) in order to rewrite any entity specific related paths.

greenskin’s picture

StatusFileSize
new2.26 KB

Here's a better solution, where entity type modules only need to return the entity ID they parse from the path.

bohart’s picture

Status: Needs review » Closed (outdated)

D7 reached its EOL back in January 2025, and there is no active release for D7 for this module.
Neither development nor support is planned for D7.

All D7-related issues (especially those with ~10 years of inactivity) are marked as outdated in a bunch.
If/once the issue still arises in D11+ versions, please create a follow-up issue.

Still, everyone can apply the patch above (not finally tested/verified by the maintainers) to their D7 projects.
Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.