-
-
Notifications
You must be signed in to change notification settings - Fork 529
[2.x] site_url returns IP address instead of domain url #16577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I saw the same behavior once for 2.8.x, hard-coding solved the issue |
I have the same behavior on a specific site on a specific hosting server. After clearing the MODX cache everything ist good again for a few month. Then suddenly it appears again. Because this happens only on this server - I think it has to to with the hosting environment. |
Like explained in the first link you posted, by default For example:
If To avoid the problem, use |
@patrickatwsrn that sounds like it may be an environment issue since you're calling it uncached. Are you still running into this and have you figured out a way to repeat it? Which version of PHP? |
Bug report
Summary
Quick summary what's this issue about.
Today some image links returned a path that included the ipv6 address instead of the domain name.
returns
instead of
This happens occationally (2-3 times per year) on other pages and I always "fix" it by hard-wiring the domain name into my tag.
I can also remember this problem to be popping up on acnchor links inside chunks using the scheme modifier.
Step to reproduce
It just happens, clearing the site cache solves the problem.
This seems to be a very old problem that occationally pops up:
(2011) https://forums.modx.com/thread/13720/site-url-returns-ip-address
(2022) https://community.modx.com/t/links-randomly-changing-to-ip-address/5493
Observed behavior
n.a.
Expected behavior
In a single context environment, site_url should always return the domain name. In a multi-contecxt environment site_url should return the site_url of the current context.
Environment
MODX 2.8.6, PLESK Server running Ubuntu
The text was updated successfully, but these errors were encountered: