Skip to content

Fix: fix issue on zorgsites where (password reset) url is created with first network site url instead of the current site#2

Closed
ShunLuk wants to merge 2 commits into
masterfrom
fix/sc-9410
Closed

Fix: fix issue on zorgsites where (password reset) url is created with first network site url instead of the current site#2
ShunLuk wants to merge 2 commits into
masterfrom
fix/sc-9410

Conversation

@ShunLuk
Copy link
Copy Markdown
Member

@ShunLuk ShunLuk commented May 20, 2026

No description provided.

first network site url instead of the current site
@ShunLuk ShunLuk requested a review from a team as a code owner May 20, 2026 09:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the multisite Bedrock URL-fixing plugin to generate network_site_url values using the current request host, addressing cases where password reset (and similar) URLs are built using the first network site’s domain instead of the active site’s domain.

Changes:

  • Modify fixNetworkSiteURL() to rebuild the base URL from the current request scheme/host rather than trimming the incoming $url.
  • Update the docblock to reflect the new “current request host” behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/URLFixer.php
Comment on lines 62 to 63

if (substr($url, -3) !== 'wp/') {
Comment thread src/URLFixer.php
Comment on lines +59 to 62
$scheme = is_ssl() ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'] ?? parse_url($url, PHP_URL_HOST);
$url = $scheme . '://' . $host . '/';

@rivanuff
Copy link
Copy Markdown

Ligt wss aan dit: https://github.com/yardinternet/zorgsites/blob/main/web/app/themes/sage/app/Hooks/WordPress.php#L60, liefst op zorgsites repo niveau fixen wss

@ictbeheer
Copy link
Copy Markdown
Member

Als je in ZorgSites de User hooks uit Brave Hooks include is dat automatisch gefixt (en ook specifiek voor alle wp-login.php) acties: https://github.com/yardinternet/brave-hooks/blob/main/src/User.php#L38

Nog beter is natuurlijk ZorgSites upgraden naar Brave Hooks 2, zodat nieuwe hook files uit Brave Hooks automatisch gebruikt worden.

@ShunLuk
Copy link
Copy Markdown
Member Author

ShunLuk commented May 20, 2026

Als je in ZorgSites de User hooks uit Brave Hooks include is dat automatisch gefixt (en ook specifiek voor alle wp-login.php) acties: https://github.com/yardinternet/brave-hooks/blob/main/src/User.php#L38

Nog beter is natuurlijk ZorgSites upgraden naar Brave Hooks 2, zodat nieuwe hook files uit Brave Hooks automatisch gebruikt worden.

Ik denk dat yard/waiting-room-block wp-hook-registrar ^1.0 nodig heeft, waardoor dat in zorgsites vastzit. Zal ik de hook-registrar daar dan ook updaten?

@ShunLuk ShunLuk closed this May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants