Opened 3 years ago
Last modified 5 weeks ago
#58722 new defect (bug)
Fix RTL display in Optional grouping on Permalinks Settings page
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Permalinks | Keywords: | has-patch has-test-info dev-feedback |
| Focuses: | rtl, multisite | Cc: |
Description
splitting from #47755 (props rachid84, johnbillion, SergeyBiryukov, costdev, joedolson, afercia, ryokuhi, oglekler)
For the Category/Tag Base fields, subdirectory network installations can show a /blog prefix before the input field. In RTL languages, the slash is on the wrong side. Also, the example URL can wrap awkwardly to the next line. In any language, the text is stacked above the field with little space between them on smaller screens.
- Create a multisite network with subdirectories.
- Open the main site.
- Visit Settings -> Permalinks.
- Scroll down to the Optional section.
Change History (11)
This ticket was mentioned in PR #2955 on WordPress/wordpress-develop by @sabernhardt.
3 years ago
#1
- Keywords has-patch added
#2
@
3 years ago
- Keywords needs-testing added
#6
follow-up:
↓ 7
@
8 months ago
- Keywords changes-requested added; needs-testing removed
Test Report UPDATED
Description
✅ This report can validate that the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/2955.diff
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 136.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch
Additional Notes
The العربية version at 600px doesn't place the blog/ on the left, but at the top. I don't feel it's completely wrong, but maybe worth being re-checked if this is the expected behavior.
Given how short these inputs can become, placing this at the top for 600px, feels right, so either English version could go on top and leave العربية as-is, or sort العربية to the left.
UPDATE:
As @sabernhardt pointed out, I completely forgot to update the CSS build; hence it was not displaying as expected the inline-block style. Now both styles, English and العربية are being displayed the same.
Still The original version in English shows the /blog on top (for 600px) and now it displays it on the left, maybe, as I say, leaving less space for the input in shorter screens.
Supplemental Artifacts
#7
in reply to:
↑ 6
;
follow-up:
↓ 8
@
8 months ago
I think your test did not update the forms-rtl(.min).css because the PR includes flex styles to put the prefix on the left. (I use npm run dev to compile RTL stylesheets.)
However, when the RTL language has the /blog prefix on the left, Firefox splits the slash on a separate line. Adding white-space: nowrap (or similar) could fix that, but removing the permalink-structure-has-blog-prefix class and its special CSS would be simpler. Then the prefix would stay above the input field at 782px and smaller.
#8
in reply to:
↑ 7
@
8 months ago
- Keywords dev-feedback added; changes-requested removed
Replying to sabernhardt:
I think your test did not update the
forms-rtl(.min).cssbecause the PR includesflexstyles to put the prefix on the left. (I usenpm run devto compile RTL stylesheets.)
Correct, I completely forgot to update the build files. Report updated.
@sabernhardt commented on PR #2955:
8 months ago
#9
I added nowrap to avoid breaking the prefix on two lines in Firefox. Also, the condition did not need to use the empty() function when $blog_prefix can only be either /blog or an empty string.
Having the prefix on the left can make the input field a bit smaller. However, it should be enough, even on 320-pixel screens (where the field is about 248 pixels wide, and can show 24 characters before scrolling).
#10
@
8 months ago
PR 2955 still uses flex to keep the prefix on the left because I think that makes more sense with a category and/or tag base in each field.
#11
@
6 weeks ago
- Milestone changed from Future Release to 7.0
@geminorum used the no-break class for a similar fix on #64381, and I updated PR 2955 to use that instead of a new .permalink-structure-has-blog-prefix code ruleset.
I'm also setting the milestone to try resolving both tickets in the same release.


In the main site of subdirectory network installations, the blog prefix does not display correctly in RTL.
LTR (at 820 pixels wide and at 600):
In RTL, the slash displays on the wrong side of "blog" and the prefix appears on the wrong side of the input field. Plus, the example URL can wrap awkwardly to the next line.
This wraps the prefix and field in a span with the
codeclass and adds CSS to keep the prefix next to the field on smaller screens. In the paragraph,codeelements are set toinline-blockto keep them on one line (or wrap better).Trac ticket: https://core.trac.wordpress.org/ticket/58722