Make WordPress Core

Opened 5 years ago

Last modified 12 months ago

#47755 new defect (bug)

Permalink in RTL version not correct

Reported by: rachid84's profile rachid84 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Permalinks Keywords:
Focuses: ui, rtl Cc:

Description (last modified by sabernhardt)

I have notice many problem with permalink in version RTL:

1- for example : https://www.byarabic.com/category/دروس/تعلم-السياقة/
تعلم-السياقة = child
دروس = parent

in LTR this is how it was : http://www.example.com/category/parent/child
but in RTL it display like this : http://www.example.com/category/child/parent
so the correct direction is http://www.example.com/category/parent/child
all url must be in LTR direction even if it in arabic letter.
so the correct direction for my permalink must be like this :
https://www.byarabic.com/category/تعلم-السياقة/دروس

*if you have an arabic support please let him to write the link manual and you will see the first word after "category" will write like this :
category/دروس/
but the second word in arabic after category/دروس will write like this :
category/دروس/تعلم-السياقة
this is a problem , because the second word in arabic must be the last word in url , like this
category/تعلم-السياقة/دروس

2- setting -> permalink : the input field it appear behind text :
https://prnt.sc/oi7t8x
the correct way to show input field it like version LTR, like this :
https://prnt.sc/oi7u63

3- also the same problem in article (block editor) :
— first about the title of the post it show like this
https://prnt.sc/oi7v2a
but the correct way is like this :
https://prnt.sc/oi7w42
— other place show wrong direction of permalink, like this :
https://prnt.sc/oi7wjy

4- about decode url: if I copy an arabic permalink from browser and I past it in other place like here it will display some symbols like %%%%% :
example of my permalink : https://www.byarabic.com/category/%d8%af%d8%b1%d9%88%d8%b3/%d8%aa%d8%b9%d9%84%d9%85-%d8%a7%d9%84%d8%b3%d9%8a%d8%a7%d9%82%d8%a9/

so I have to decode link to fix the problem and then I can send it to my friend
I use this website to decode it : https://www.url-encode-decode.com/

Change History (20)

#1 @johnbillion
5 years ago

#47756 was marked as a duplicate.

#2 @SergeyBiryukov
5 years ago

  • Component changed from General to Permalinks
  • Focuses ui rtl added

#4 @SergeyBiryukov
4 years ago

#49462 was marked as a duplicate.

#5 @sabernhardt
2 years ago

  • Description modified (diff)
  • Summary changed from Permanlink in RTL version not correct to Permalink in RTL version not correct

Thanks for the report!

Child pages/categories (#47565):

  • Permalinks within the admin (including Classic Editor) use ‎. We might want to add another entity for each parent page or category.

Permalink Settings screen:

  • Fixing the custom structure field in RTL is part of the patch on #55498.
  • For the Category/Tag Base fields, subdirectory network installations can show a /blog prefix before the input field with the slash on the wrong side. I think I would rather fix that on this ticket instead of 55498.

Block editor:

  • RTL support is better since GB12729 and GB13551, though permalinks still reverse child page slugs with parents.
  • I'll add suggestions for the post-publish panel on your Gutenberg issue, GB16400.

Decoding:

  • The "Copy to clipboard" buttons in the admin and editor likely could decode their URLs.
  • When editing a comment, the permalink on that screen is encoded.

Related support topic

This ticket was mentioned in PR #2955 on WordPress/wordpress-develop by sabernhardt.


2 years ago
#6

  • Keywords has-patch added

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):

https://i0.wp.com/user-images.githubusercontent.com/17100257/177835146-9eec7d5c-8cf5-424e-bc22-77f89cbedb7b.png

https://i0.wp.com/user-images.githubusercontent.com/17100257/177835149-89e628d9-b00b-49c1-b7ee-3e57697fa8e3.png

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.

https://i0.wp.com/user-images.githubusercontent.com/17100257/177835151-82d8d5f4-1d0d-4ea1-9aa3-6766f2b9cf55.png

https://i0.wp.com/user-images.githubusercontent.com/17100257/177835150-4036b888-f931-41d4-abdf-0c365d0a0cf0.png

This wraps the prefix and field in a span with the code class and adds CSS to keep the prefix next to the field on smaller screens. In the paragraph, code elements are set to inline-block to keep them on one line (or wrap better).

I also wrapped the Optional group in a fieldset and added aria-describedby to use the paragraph as context to fill out this group of fields. This required a few CSS adjustments for margin and padding.

Trac ticket: https://core.trac.wordpress.org/ticket/47755

sabernhardt commented on PR #2955:


2 years ago
#7

LTR with patch

https://i0.wp.com/user-images.githubusercontent.com/17100257/177839974-341d5ce1-b157-4ff4-b347-c2de4d997320.png

https://i0.wp.com/user-images.githubusercontent.com/17100257/177839976-fea2696a-1ac7-4da9-a522-78dcc5d4304a.png

RTL with patch

https://i0.wp.com/user-images.githubusercontent.com/17100257/177839966-95b67435-a7d6-499a-abb3-f4d00dd79900.png

https://i0.wp.com/user-images.githubusercontent.com/17100257/177839971-af1b3fc4-98a1-43cd-bca0-b0768187e108.png

#8 @sabernhardt
2 years ago

  • Milestone changed from Awaiting Review to 6.1

Issues not addressed in PR 2955:

  • The patch on #47565 might fix both the child page link display and the visibly encoded comments links.
  • The media library copy-to-clipboard buttons already decode URLs, but that still leaves the post link copy button in the block editor to be fixed (GB16400).
  • File URLs in media library input fields (.attachment-details-copy-link in the Grid mode dialog and .urlfield on the attachment editor screen) will need either direction: ltr or the existing ltr class. This change might fit on #54915 or else a new ticket, especially if filenames should be left-to-right as well.

#9 @sabernhardt
22 months ago

  • Milestone changed from 6.1 to 6.2

This ticket was mentioned in Slack in #core by costdev. View the logs.


17 months ago

#11 @costdev
17 months ago

  • Keywords needs-testing added

This ticket was discussed during the recent bug scrub. As the patch still needs testing, I'm adding the needs-testing keyword. I'll also try to track down the appropriate Version for this ticket.

Update: Okay, so I couldn't work out when this particular issue was introduced for sure. If anyone happens to work that out, please update the Version property. 🙂

Last edited 17 months ago by costdev (previous) (diff)

This ticket was mentioned in Slack in #accessibility by sabernhardt. View the logs.


17 months ago

#13 @sabernhardt
17 months ago

  • Keywords needs-refresh added; needs-testing removed
  • Milestone changed from 6.2 to 6.3

Following a discussion in #accessibility, the fieldset I proposed in PR 2955 probably should be removed.

@joedolson

Seems unnecessary to me. Grouping only two fields, and with a legend that isn't very descriptive.
I'm not sure the extra verbosity is helpful.

@afercia

Also, not sure the H2 within the legend is the best thing to do.

@ryokuhi

It should be consistent with what is above, I think.

@sabernhardt commented on PR #2955:


14 months ago
#14

Updated screenshots after removing the fieldset and legend

LTR with patch

https://i0.wp.com/user-images.githubusercontent.com/17100257/241413266-33cc01a9-10b0-4bf3-a4e3-416a804fd790.png

https://i0.wp.com/user-images.githubusercontent.com/17100257/241413265-61a4a7bb-917e-48ad-879e-b92306e469b2.png

RTL with patch

https://i0.wp.com/user-images.githubusercontent.com/17100257/241413261-c1c2c6aa-3c9d-4937-8dca-40bde8e44cb4.png

https://i0.wp.com/user-images.githubusercontent.com/17100257/241413264-0e56c08c-7ceb-4301-bd55-b138c4c767d8.png

#15 @sabernhardt
14 months ago

  • Keywords needs-refresh removed

This ticket was mentioned in Slack in #core by oglekler. View the logs.


13 months ago

#17 @oglekler
13 months ago

  • Keywords needs-testing added

Patch was refreshed and needs testing.

This ticket was mentioned in Slack in #core by tamara1720. View the logs.


12 months ago

@sabernhardt commented on PR #2955:


12 months ago
#19

This has its own separate ticket 58722 now.

#20 @sabernhardt
12 months ago

  • Keywords has-patch needs-testing removed
  • Milestone changed from 6.3 to Future Release

This is more of a general 'umbrella' task ticket, so I opened a new one for the multisite-specific permalink settings page issue.

Note: See TracTickets for help on using tickets.