How to get "currently active domain" by code?

Created on 31 May 2023, over 1 year ago

Drupal Version

D. 10.0.9

Domain module version

2.0-dev

Expected Behavior

[What did you try to do? What URL did you use to do it?]
Get the "currently active domain" by code, then set the view title for each domain.

Actual Behavior

[What actually happened?]
It seems \Drupal::service('domain.negotiator')->getActiveId(); returns all active domains, not the "currently active domain". Thanks.

Steps to reproduce

[A bullet list of steps to reproduce the error. Note if the error always happens or sometimes happens.]

💬 Support request
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

🇨🇳China hongqing

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

Comments & Activities

  • Issue created by @hongqing
  • Status changed to Closed: cannot reproduce over 1 year ago
  • 🇨🇳China hongqing

    \Drupal::service('domain.negotiator')->getActiveId(); returns the correct active domain id. There was a error in my code, I am closing it.

Production build 0.71.5 2024