Drupal Version

10.4.4

Domain module version

2.0.0-beta2

I have a site set up using Domain with several of its submodules including Domain Source.

When I try to modify the layout of a node on my local dev server, the link redirects to my live site. It does not do this on my test site.

mysite.com - LAYOUT tab goes to mysite.com/node/{nodeid}/layout
test.mysite.com - LAYOUT tab goes to test.mysite.com/node/{nodeid}/layout
mysite.lndo.site - LAYOUT tab goes to mysite.com/node/{nodeid}/layout

That last one should go to mysite.lndo.site/node/{nodeid}/layout

The other tabs (Edit, Delete, Manage Display, Revisions) all work correctly.

If I go to Admin > Configuration > Domains > Domain Source Settings, I see where I can disable the rewriting for canonical, delete_form, delete_multiple_form, edit_form, version_history, revision, create, display. There is no option for layout_builder.

If I uncheck one of those (e.g. edit_form), the tab performs incorrectly the same way the Layout tab is. I also tried on a different site that uses the same dev server config and layout builder, but does not use the Domain module and it works as expected.

How can I fix this? Thanks in advance!

Comments

dchaffin created an issue. See original summary.

mably’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

If I understand it correctly you want to deactivate Domain source link rewrite behavior on Layout Builder pages?

@dchaffin, have you been able to find a solution on your side?

Unless new, valuable information is provided, this issue will be closed in 3 months.

mably’s picture

@dchaffin Check this issue's MR for an example of how it could be done: #3546074: Add hook to domain_source module to alter the list of disallowed routes.

function hook_domain_source_excluded_route_names_alter(array &$excluded_route_names) {
  // Exclude layout builder node view route from domain source processing.
  $excluded_route_names[] = 'layout_builder.overrides.node.view';
}
mably’s picture

You can now exclude specific routes directly from the Domain Source settings page:

Domain source settings excluded routes

mably’s picture

Status: Postponed (maintainer needs more info) » Fixed

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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.