Problem/Motivation

Under certain circumstances, paths in path fields display in an unexpected order when using RTL languages or mixing RTL characters with Latin characters in the same path. See #2336569-34: Remove incomplete <span> usage from #field_prefix and #field_suffix and below for a full explanation.

Steps to reproduce

Enter paths using mixed languages, for example part1/חלק2/part3/חלק4 and try rearranging the path order. See the screenshots below.

Proposed resolution

Determine if this behavior is expected and desired or not, and correct it if not. From the linked issue:

Regarding the URLs, I would like to compare it with the Path alias field on node form page, since the path alias field already shows in RTL.
I didn't
In the view path field I noticed that it shows fine in these cases (screenshot attached):
- One Arabic part.
- Mixed parts (Arabic & English parts) It should not have two Arabic parts beside eachother.

And it shows in wrong order in these cases:
- Two or more Arabic parts beside each other.
- Mixed parts having two Arabic parts or more beside each other.

That's mean the user now should separate the Arabic URL parts with English to not notice this issue.
The approach in the (Path alias field in node form and the site front page field in site basic information settings) is working fine if we are writing same RTL language words in the path in RTL path field. (Path alias screenshots attached).

So, I in my humble opinion, I think this is a browser issue since the same behavior show in the browser address bar. And it depends if we are writing the all path parts in the same RTL language, then making the path field RTL is make sense. But if we use the English language for our page paths and might use only one part in the same RTL language, then making the path field LTR will be ideal.
Also, I think we might consider these points:
- Currently, the default Drupal internal paths is in English regardless what is the main site language.
- The path fields mostly not will be used by the site visitors or regular users.
- Path alias field in node form might be allowed for editor users. So, it might be fine for it to show in RTL like the current state. But in the view path field, I think it mostly will be used by the site admin only. And I think probably it might not have more than one part in the same RTL language.

I attached a screenshots here I hope it will explain the compare between when the field is in RTL and in LTR.
Note: Green text in screenshots means the path parts order is correct. Red means path parts order is wrong.
Note: I didn't applied any patch, just want to share my thoughts.


Remaining tasks

See above

User interface changes

TBD

API changes

n/a

Data model changes

n/a

Release notes snippet

TBD

Comments

katherined created an issue. See original summary.

katherined’s picture

Issue summary: View changes

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.