Problem/Motivation

When trying to override the URLs configured for the language.negotiation config targeting a configured domain, the overrides are never loaded. After tracing through the code this appears to be a byproduct of the recent static caching introduced in #3002744: Domain Config Overrides paired with a recursive loading issue for the language negotiation config.

While trying to load the config override for language.negotiation, the context initiation is triggered which eventually recurses back to this method again with the domain unset. At this level a result of no overrides is stored for the hashed key. When this config is attempted to be loaded again later, the statically cached key is found with no results, so the overrides are never returned.

Proposed resolution

Identify a flag for this scenario to allow bypassing of the static cache until the language negotiation settings are fully loaded.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slucero created an issue. See original summary.

slucero’s picture

Status: Active » Needs work
FileSize
500 bytes

I don't expect this is the best solution, and I haven't done any testing of the performance impact it may have relative to the results achieved from #3002744: Domain Config Overrides, but moving the override assignment to only apply when a domain has been identified resolved the issue.

agentrickard’s picture

This makes sense, though I also wonder if it offsets most of the performance gains.

That really needs a review from the team that filed the other issue.

agentrickard’s picture

Status: Needs work » Needs review

No response from the other team. Moving this to testing here: https://github.com/agentrickard/domain/pull/445

agentrickard’s picture

Status: Needs review » Fixed

  • agentrickard committed 8f3ca9f on 8.x-1.x authored by slucero
    Issue #3004473 by slucero: Language negotiation config cannot be...
  • agentrickard authored e1f5e7d on 8.x-1.x
    Merge pull request #445 from agentrickard/3004473-cache
    
    Issue #3004473...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.