Opened 2 weeks ago
Last modified 7 days ago
#63271 new defect (bug)
Multisite (Subdirectory) URL Corruption in Page Content (Language Site)
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7.2 |
Component: | Networks and Sites | Keywords: | |
Focuses: | multisite | Cc: |
Description (last modified by )
- WordPress Version: 6.7.2
- Multisite: Enabled (Subdirectory installation)
- Theme: Twenty Twenty-Five
- Plugins: All plugins deactivated
- wp-config.php: Default settings
- .htaccess: Default settings
Site Structure: Main site (ID=1
) at root, additional site (ID=X
, e.g., 2) in subdirectory /hu/
(for Hungarian language).
Steps to Reproduce:
- Create a new page or edit an existing page on the subdirectory site (
/hu/
). - Switch to the Code Editor.
- Add an HTML link within the page content that points to a page on the same domain within the subdirectory site. Example:
<a href="https://www.mydomain.io/hu/book-a-call/">link text</a>
- Save the page.
- Reload the editor page.
- Check HTML of the link.
Expected Behavior:
The link should remain as entered.
Actual Behavior:
The URL is corrupted, with the subdirectory name being duplicated or altered. Example:
<a href="https://www.mydomain.iohuhu/hu/book-a-call/">link text</a>
Additional Information:
This issue only occurs on subdirectory sites within the Multisite environment.
Links to external domains (e.g., https://www.google.com
) are not affected.
The main site (ID=1
) is not affected.
Attachments (1)
Change History (6)
#3
@
2 weeks ago
I tested this in a clean wp-env environment and couldn’t reproduce the issue. The editor saved the links correctly, so I think WordPress itself is not the cause of the problem. Since there were no plugins active and the default theme was used, the issue probably comes from outside WordPress.
The most likely causes are server settings or caching. Incorrect rewrite rules or proxies changing the request could create broken URLs. Also, caching systems or tools that optimize content might change or serve old HTML. Turning off these systems and checking how the content is saved and shown could help find the issue.
#4
@
2 weeks ago
#63270 mentions a similar link corruption, but the situation sounds very different.
#5
@
7 days ago
Yes, it's somewhat the same because whenever I save content, the folder name is always added to the link. so after updating the content few times it looks like this: <a href="https://www.mydomain.iohuhuhuhuhuhuhuhu/hu/book-a-call/">link text</a>
Now I use relative URLs instead, which has 'solved' the issue. Relative links don't contain the domain or the site folder; therefore, the issue isn't triggered.
as I mentioned it happens if I add content in Code editor, or by using HTML blocks.