- π«π·France dqd London | N.Y.C | Paris | Hamburg | Berlin
First of all let's decrease the issue priority. Descriptions of the Priority β and Status β values can be found in the Drupal project issues β documentation.
Second: please (friendly reminder) all users who report here should carefully add details, especially the domain module version in use. The issue gets some months old now and there is a possible chance that you use a newer version of domain now than when the report has been created. Nevertheless I will move it to latest dev which is often the default to have patches up which can be pushed to the latest project dev branch.
Last but not least: I still cannot reproduce the issue. Please consider that the domain module is a very sensitive project and not as "unbreakable" via UI like maybe Views, etc. What I mean by that is: you should really carefully plan and set it up and test in different scenarios what works best. I can confirm running 3 fun projects each with more than 10 domains without flaws and even with mixed content translations and frontpage Views. But I do not make many changes and back and forth on the basic concept of the projects. So I am sure that: if there is a real issue behind the report, then it has been created in a rather mixed or extended scenario and it needs far more detailed report. The maintainer kindly provided a patch already right out of the box and this is very time consuming. I would like to prevent further patches and efforts before it is not clear enough what happend and what has maybe partly caused it. Also backtraces and logs would be helpful in the moment the issue occurs. Are you using Views for the frontpage? Is it set up correctly with the recommended additions of domain Views settings then? Or is it a default node frontpage like core provides? (from D8 and higher I think it is always Views and the installation holds a default Views frontpage view added) - It is all important to know.
Thanks for all the efforts and reports and thanks for understanding.
- Status changed to Postponed: needs info
over 1 year ago 1:35pm 22 February 2023 - πΊπΈUnited States agentrickard Georgia (US)
We have a test for this behavior in DomainConfigHomepageTest.php, so until we can create a replicable test that shows the bug, I can't commit any changes.
- π¨π³China hongqing
I encountered a similar issue. I aim to assign a front page for each domain, but after saving the configuration, it applies to All Domains even if I choose one domain before saving. After saving, it shows "This configuration will be saved for all domains without custom configuration and displayed in all languages without custom configuration.", which should be shown before saving the configuration if All Domain was chosen. The screenshot is enclosed.
- π«π·France dqd London | N.Y.C | Paris | Hamburg | Berlin
First of all, this maybe does not belong to the issue report here. But as always: thanks for taking the time to report. But as I sad it depends on many things. This screenshot just shows the confirmation message. Did you tried out to tick the checkbox "remember last domain selection" in domain config before making changes? And are these areas of Drupal admin already added to the domain config forms recognition. Also check the tab "saved configurations" which has been saved and what is in it. And again, please @all provide infos about domain version, core version and the way you decided to go in your setup etc.
There are many ways how you can achieve different frontpage content for different domains, and it is hard to know which way somebody has chosen. Some reports rather feel like a "support request" than like an issue report. Thanks for the reports but: Please provide more details.
- π¨π³China hongqing
@diqidoq. Thanks for your prompt reply. "remember last domain selection" is not checked and "site-information" is included in the domain config forms recognition.
I find the problem is that when I switch the domains, the domain for the default frontpage remains the current domain, which causes the problem.
I am using 2.0.x-dev for Drupal 10, the 8.x version works well with drupal 9.
- π³π±Netherlands jandewit6
Have exactly the same problem, with the default domain consistently taking the frontpage node from the other domain (two domains).
And yes, " remember last domain selection" is on, /admin/config/system/site-information is in the saved configurations.The switch usually happens after I as admin logged in.
I came accross the language selection mentioned in https://www.drupal.org/project/domain/issues/3154402 β #32. Also didn't help.Diqidoq wrote: " There are many ways how you can achieve different frontpage content for different domains"
Can you please show some ways other than at /admin/config/system/site-information?
- π³π±Netherlands jandewit6
In the hope it helps others, the following works with domains:
add the following lines to your settings.php:
/* hard code the domains front pages */
$config['domain.config.mydomain1_org.system.site']['page']['front'] = '/node/2';
$config['domain.config.mydomain2_com.system.site']['page']['front'] = '/node/233';In which obviously mydomain1_org and mydomain2_com are replaced for your own domain names. Same for /node/2 etcetera.
- π¨π³China hongqing
#20 does not solve my problem, I still have to clean cache many times to show the assigned frontpage, or it will show the frontpage of the main domain, which is /node.
- Status changed to Active
4 months ago 12:44pm 25 July 2024 - π¨π³China hongqing
I encountered the same problem with Drupal 10.3.0 and Domain 2.0.0-beta1.
The frontpage will be changed to the main domain frontpage /node after I add some products in drupal commerce. This can be solved by cleaning cache many times.
It seems this only happens with a role that I created to manage products, but not with admin role.
- π¨π³China hongqing
After checking the saved configuration, I found the following records:
domain.config.master.en.system.site system.site Masters English domain.config.master.system.site system.site Masters all domain.config.master.zh-hans.system.site zh-hans.system.site Masters all
The domain.config.master.zh-hans.system.site should apply to Chinese only, but it always apply to all languages. Not sure if this causes this issue.
- π¨π³China hongqing
More update:
After adding content, the frontpage will be changed to others if I browse the frontpage with the same user, which is a created role with permission to add products. While after adding content, the frontpage will not be changed to others if I browse the frontpage with an anonymous user then with the user added the products.
- π¨π³China hongqing
The discussion at Wrong front pages for all domains using the domain.config overrides. β gives me some hints.
It works after I uncheck 'Account administration pages' in Detection and selection of languages. Although it is not perfect, it allows me to add contents at least.
- π«π·France dqd London | N.Y.C | Paris | Hamburg | Berlin
#19 Can you please show some ways other than at /admin/config/system/site-information?
That was a little bit misleading. I was not referring to where you set the path used as front page but rather to the many different ways how you can build front page content on that path. For example /node can refer to the teaser display list but also to a list of nodes rendered by Views which overrides the path, or by Page Manager or by config_pages. etc. I was just mentioning it because there can be many underlying reasons for why your content on front page has issues with domain assignment. For example if Views isn't set up correctly regarding Domain for front page content.