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.
It would be great to have a Drupal 8 version of this module.
Comment | File | Size | Author |
---|---|---|---|
#10 | domain_path_d8-2821633-10.patch | 740 bytes | cburschka |
#9 | domain_path-d8-2821633-9.patch | 619 bytes | cburschka |
#2 | domain_path_d8_2821633_1.patch | 41.47 KB | theapi |
Comments
Comment #2
theapi CreditAttribution: theapi at Dennis commentedHere's a patch to get started created by David Grayston and myself.
Comment #3
agentrickardPatch review really won't work here. There is too much code.
Do you want access to the Git repo to add this new code?
Comment #4
theapi CreditAttribution: theapi at Dennis commentedSure.
Add myself (https://www.drupal.org/u/theapi) and David (https://www.drupal.org/u/davidgrayston )
Comment #5
orbistertius CreditAttribution: orbistertius commentedIs there any news on a Drupal 8 version? Perhaps I will not help out as a developer but the company I am working for might help to pay a person releasing a working 8 version...
Comment #6
agentrickardI don't think anyone is working on it. The last discussion was at https://github.com/agentrickard/domain/issues/290
Comment #7
Andy Tawse CreditAttribution: Andy Tawse commentedHi,
Using the patch above, plus another change (to make the domain_id field unsigned, otherwise it could cope with one of my domain IDs), I have this working quite well. Thanks for that - it's very useful!
Just thought I'd add that here for reference, even if development will be on github.
I also wrote a migration (in domain_path_install()) to move existing aliases over to the new table. This is specific to my project though, as we had an existing site (with Domain installed from the beginning) and have just added a second (along with domain_path) so wanted all the existing aliases to be associated with the first domain.
My project is ongoing though so I'm sure I'll find more improvements in the coming weeks. I can't see anywhere on the github repo to contribute though - I don't think this module got added on there?
thanks
Comment #8
cburschkaInstalling the patched module apparently breaks the site if no domains have been set up yet. The error is:
(Though to be fair, the domain module doesn't document that
getActiveDomain()
may return NULL, either.)Comment #9
cburschkaHere is a small patch that checks the return value of getActiveDomain() before calling it.
An alternative would be for the parent module to define a fallback domain object, but this fix is much simpler.
(I'll also be working with this code over the next few weeks; internally for now but I'll be happy to contribute upstream once there is a branch here or on github.)
Comment #10
cburschkaThe schema issue encountered by Andy in #7 is indeed a bug - domain_id is an unsigned 32-bit integer (on platforms that support them). The database table must also use an unsigned integer column there, or it overflows 50% of the time.
Comment #11
agentrickardIs anyone interested in maintaining this code as a separate project?
I'm trying to decide how best to manage it. It may introduce too much overhead to be in the main module bundle.
Comment #12
anydigital CreditAttribution: anydigital as a volunteer and at Highweb commented@agentrickard, I am interested!
My new project will rely heavily on its functionality! And I also have a "Domain Path Rewrite" (https://www.drupal.org/project/domain_path_rewrite) module which is a good candidate to be ported/merged in D8.
Comment #13
agentrickard@tonystar
I've given you Git access and other permissions to administer the project.
Fell free to start an 8.x-1.x branch and tag me in any issues you want reviewed.
Comment #14
andriic CreditAttribution: andriic at Adyax commentedcheck our implementation of domain_path for d8
https://www.drupal.org/node/2878050
This module provides creating separate aliases for entities per domain. It was testing with Node, Taxonomy term and User entities.
It is also provides possibility to create pathauto patterns per domains or a list of domains.
Comment #15
anydigital CreditAttribution: anydigital as a volunteer and at Highweb commentedThanks for pointing- I'll review. Feel free to ping me in Facebook or Drupal Slack.
Comment #16
anydigital CreditAttribution: anydigital as a volunteer and at Highweb commentedComment #17
cburschkaSide note: If this code will be abandoned in favor of a rewrite (eg at #2878050: [domain_path] Domain Path or https://drupal.org/project/domain_path_rewrite), this won't matter, but I discovered another bug in the last patch.
The hook_module_implements_alter function reorders hooks to ensure its field hooks override pathauto, but doesn't do so for field_info_alter. This breaks domain aliasing when pathauto is installed, applying the alias only to the current domain rather than the ones selected for the node.
Comment #18
drclaw CreditAttribution: drclaw commentedHere's a d8 port of this module that I put together based on some of the work & discussion in https://www.drupal.org/node/2878050
https://www.drupal.org/sandbox/ceastwood/2932431
Comment #19
skrasulevskiy CreditAttribution: skrasulevskiy at Adyax commentedHello @agentrickard,
could you check reworked version of the "domain_path" module for Drupal 8 - https://github.com/Adyax/domain_path based on Adyax team work (https://github.com/onesixromcom/domain_path) and @drclaw (https://www.drupal.org/sandbox/ceastwood/2932431 - dependencies from the redirects and pathauto were removed and used inbound/outbound paths staffs as was mentioned here - https://www.drupal.org/project/contrib_tracker/issues/2878050#comment-12...), please? We used it on several our projects and it works fine. We are ready to upload code for 8.x version and support it if you provide us with access to Git repo.
Thanks.
Comment #20
agentrickardI don't see any test coverage.
I am particularly interested in tests of Domain Path when used with Domain Alias and Domain Source, both of which can change the base url.
Comment #21
skrasulevskiy CreditAttribution: skrasulevskiy at Adyax commentedHello @agentrickard,
we added test coverage for module here - https://github.com/Adyax/domain_path. Could you check it out, please?
Thanks.
Comment #22
agentrickardNice.
I gave you -- @skrasulevskiy -- write access and permissions to release code.
Comment #24
skrasulevskiy CreditAttribution: skrasulevskiy at Adyax commentedThanks @agentrickard,
we added 8.x-1.0-beta1 version of module: https://www.drupal.org/project/domain_path.
Comment #25
agentrickard