Problem/Motivation

  • The Varbase Starter recipe sets the front page to the alias /home (page.front: /home), and its default content pins every path alias to English (path: - alias: ..., langcode: en).
  • During a non-English install, core's default content importer moves each content entity to the site's default language (Importer::verifyNormalizedLanguage()), but PathItem::postSave() keeps the explicit langcode: en. The aliases stay English while the pages do not.
  • Drupal looks aliases up in the current language, so /home does not resolve: the front page and every page reached by alias return 404.
  • Same bug as Horizon Aid #3629922 (MR !119), reproduced there with a Portuguese (pt-pt) install: home 404 without the fix, 200 with it.
  • An installed copy of this recipe has 6 pinned aliases. The MR will report the count on the current 1.0.x HEAD.

Steps to reproduce

  1. Install Drupal CMS and pick the Varbase Starter site template, or run drush site:install drupal_cms_installer installer_site_template_form.add_ons=varbase_starter --locale=pt-pt
  2. Choose Portuguese (or any non-English language) as the default language.
  3. Open the home page: "Page not found".
  4. Repeat in English: the home page renders.

Proposed resolution

  • Remove the pinned langcode from the path items in the recipe's default content, so each alias follows its entity's language. English installs are unchanged.

Remaining tasks

  • ✅ File an issue
  • ❌ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Fixed the home page returning 404 when the site is installed in a language other than English.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed 3c64b6ed on 1.0.x
    fix: #3636515 Home page not found when the default language is not...

  • rajab natshah committed 7669bd04 on 1.0.x
    fix: #3636515 Confirm the contact form inline and add the missing Terms...
rajab natshah’s picture

Status: Active » Needs review
rajab natshah’s picture

Issue summary: View changes
Status: Needs review » Fixed
Issue tags: +varbase_starter-1.0.10

✅ Released in varbase_starter 1.0.10

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.

xpete’s picture

Issue summary: View changes

I run in to the following error when I try to test this:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: http://drupal.local/core/install.php?rewrite=ok&langcode=pt-pt&profile=d...
StatusText: OK
ResponseText: Drupal\Core\Recipe\InvalidConfigException: There were validation errors in canvas.page_region.vartheme_bs5.header:
- component_tree.589cc59f-4a7b-42c2-b285-8fd7b65e6439.component_version: '7d528e00f56b3abf' is not a version that exists on component config entity 'block.system_branding_block'. Available versions: 'e6b6bf3626513e5b'.
- component_tree.64cc6d33-c24c-45be-a52b-1deb85fcab0b.component_version: 'abd3c7419d413cec' is not a version that exists on component config entity 'block.views_exposed_filter_block.search-block_1'. Available versions: '7884c75e6bd42ecc'. in Drupal\Core\Config\Action\ConfigActionManager->applyAction() (line 179 of /home/username/public_html/drupalcms2/web/core/lib/Drupal/Core/Config/Action/ConfigActionManager.php).

Maybe the version should not be specified.