Problem/Motivation

  • The Educare 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 119 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 Educare site template, or run drush site:install drupal_cms_installer installer_site_template_form.add_ons=educare --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 educare-1.0.10

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.

Issue fork educare-3636516

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 aaf9ed53 on 1.0.x
    fix: #3636516 Home page not found when the default language is not...

  • rajab natshah committed 15475005 on 1.0.x
    fix: #3636516 Confirm the contact form inline so submitting no longer...
rajab natshah’s picture

Status: Active » Needs review
xpete’s picture

I've run into this error while trying 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.content_template.node.program.full:
- component_tree.c8d2b3e4-0002-4a02-9a02-0000000000f1.component_version: '0d7e961dd03aa710' is not a version that exists on component config entity 'block.system_breadcrumb_block'. Available versions: '3d1fe7fe5816c768'. 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.

rajab natshah’s picture

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

✅ Released in educare 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.