Infinite 301 redirect loop when a regional locale is enabled at instance level but disabled at site level (Liferay 7.4 GA132)

Version: Liferay 7.4 GA132 / 2025.Q1

Problem description

When a Liferay site has only es_AR enabled, but the instance also enables other Spanish regional locales (es_ES, es_MX), requesting an existing page using one of those disabled regional locales causes an infinite HTTP 301 redirect loop.

The response redirects to the exact same URL that was requested.

Steps to reproduce

  1. At instance level, enable es_AR, es_ES, and es_MX.

  2. Create or configure a site with only es_AR enabled.

  3. Ensure the site has an existing page with friendly URL /home.

  4. Request /es-AR/home → HTTP 200.

  5. Request /es-ES/home → HTTP 301 with Location: /es-ES/home.

  6. Request /es-MX/home → Same redirect behavior.

  7. Disable es_ES and es_MX at instance level and repeat the request. The infinite redirect loop disappears.

Additional observations

  • Nonexistent pages return HTTP 404, even when requested under /es-ES/.

  • Other language families, such as en_US or pt_BR, return HTTP 404 when unavailable at site level.

  • Re-enabling es_ES at site level makes /es-ES/home return HTTP 200.

  • The problem is reproducible with curl without browser cookies.

Expected behavior

When a regional locale is disabled at site level but remains enabled at instance level, the request should be handled gracefully, either by redirecting to an available site locale or returning HTTP 404.

Actual behavior

Liferay responds with HTTP 301 and a Location header pointing to the original URL, creating an infinite redirect loop.

Request

Could you confirm whether this is a known issue, provide its LPD/LPS reference if available, and indicate whether a fix exists in a later release?