Frontpage nodes changes randomly to other domain configured frontpage node

Created on 17 May 2022, over 2 years ago
Updated 18 September 2024, 3 months ago

Drupal Version

9.3.13

Domain module version

8.x-1.0-beta6

Expected Behavior

I have 5 domain records total. Each of these domains has alias set for local, dev, test, and production environments. 3 of the records also have french (non-default language) domain alias assigned to them.

When I visit the homepage node of each domain, the node displayed should reflect the what was assigned in the domain configuration yml file.

Actual Behavior

The french domain assigned frontpage for one specific domain record randomly changes to a frontpage node assigned to one of the other domain. Tends to be one specific domain record, but I've seen it switch to other domain frontpage nodes as well. Does not happen on the English version.

Usually is fixed by clearing Acquia's varnish cache and Drupal's cache.

Steps to reproduce

It seems to happen randomly. Typically I've tried the following which sometimes causes the issue:
- Clearing Drupal caches
- Clearing Acquia Varnish Cache
- Deploying code to production.
- Editing blocks, nodes, etc

It's not like my configuration settings are changing either. When it happens, I check my site settings to see if any changes have been made , but it's always set to the correct node.

I've gone weekends without it happening to multiple times in a day during the week. Most I can say is when there are users making changes to content on the site, it tends to happen more often.

Worth noting that I'm using an Acquia server environment with our site, but their support doesn't seem to detect any issues on their end. There also doesn't seem to be any error or relevant notice in the drupal logs either.

πŸ› Bug report
Status

Active

Version

2.0

Component

- Domain Config

Created by

πŸ‡¨πŸ‡¦Canada tklepsch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡«πŸ‡·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 almost 2 years ago
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin
  • πŸ‡ΊπŸ‡Έ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 5 months ago
  • πŸ‡¨πŸ‡³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.

Production build 0.71.5 2024