Postponed on
#2407505: [meta] Finalize the menu links (and other user-entered paths) system β
Problem/Motivation
Despite issue 1879120, link URL entry in the WYSIWYG is inconsistent with link URL entry in the link field. To link to a specific node: in the WYSIWYG, you have to write "/node/#", in the Link URL field, you would write "node/#".
This is a user experience issue.
Proposed resolution
Make link URL entry consistent between how URLs are added in the WYSIWYG, and how link URLs are added in the link field.
EditorLinkDialog should transform Drupal paths, like the Link field does (LinkWidget::massageFormValues
<!-- See https://drupal.org/core-mentoring/novice-tasks for tips on identifying novice tasks. Delete or add "Novice" from the Novice? column in the table below as appropriate. Uncomment tasks as the issue advances. Update the Complete? column to indicate when they are done, and maybe reference the comment number where they were done. -->
(); ). EditorLinkDialog should not do this by pre-prending a slash because this would not work for sites installed in a subdirectory.
Remaining tasks
1. Complete patch - was blocked by #2347469 ?
2. Continue discussion of how it should work (output should be root relative path, drupal would store whatever user entered)
3. Add tests
User interface changes
In LinkDialog a user would enter "node/#" like they would do in a link field.
Original report by Charles Belov
Postponed on #2407505: [meta] Finalize the menu links (and other user-entered paths) system
Despite issue 1879120, link URL entry in the WYSIWYG is not consistent with link URL entry in the link field.
Steps:
1. Create a new Drupal 8.0-alpha12 website at simplytest.me
2. Enable the Link module
3. Add a link field to the Basic Page content type
4. Add content > Basic page > title "test page 1" (without the quotes) > Save and publish
5. Add content > Basic page
6. Title "test page 2"
7. Body - type "test page 1"
8. Select text "test page 1"
9. Click link icon
10. In the URL field, type "node/1"
11. Click OK
12. In the Basic Page Link URL field, type "node/1"
13. In the Basic Page Link Link text field, type "test page 1"
14. Click Save and publish
15. Click "test page 1" link corresponding to link field
Actual and expected results: Goes to [protocol]://[domain]/node/1 and displays test page 1
16. Click Back button
17. Click "test page 1" link corresponding to link in Body text
Actual result: Goes to [protocol]://[domain]/node/node/1 and displays not found error
Expected result: Goes to [protocol]://[domain]/node/1 and displays test page 1