Problem/Motivation

The help text for creating URL aliases during node creation is confusing and wordy. This leads to users entering the wrong path.

Proposed resolution

Proposed, simplified text:
The alternative URL for this content. For example, type "about" when creating an about page. Use a relative path without a trailing slash.

Remaining tasks

A patch needs to be written changing the text.

User interface changes

Changes the help text on the node creation form

API changes

No changes.

Original report by add1sun

Note: This issue is being posted here as an exercise by a participant in the learndrupal.org ladder for contributing to core. Please don't do anything with this post. The real issue has already been resolved in Drupal 8. If you would like to try this exercise yourself, visit learndrupal.org and click on Drupal Ladder

Current:

Optionally specify an alternative URL by which this content can be accessed. For example, type "about" when writing an about page. Use a relative path and don't add a trailing slash or the URL alias won't work.

Proposed:

The alternative URL for this content. For example, type "about" when creating an about page. Use a relative path without a trailing slash.

CommentFileSizeAuthor
#43 rewrite-url-description-1681300-43.patch912 bytesPercy101
#42 Screenshot_1.png38.38 KBragasirtahk
#42 rewrite-url-description-1681300-42.patch912 bytesragasirtahk
#41 Screenshot_1.png38.38 KBragasirtahk
#41 rewrite-url-description-1681300-38.patch912 bytesragasirtahk
#40 ForGCI-1681300-40.patch919 bytesanhtq
#40 rewrite-url-description-1681300.PNG61.82 KBanhtq
#38 rewrite-url-description-1681300-38.patch877 bytesjayly
#38 screenshot from 2017-03-25 00-27-48.png108.49 KBjayly
#37 rewrite-description-for-url-aliases-1681300-37.patch908 bytesfranciscojlucero
#37 patch.png7.85 KBfranciscojlucero
#36 rewriteUrlAliasing-168100-36.patch909 bytesakashkrishnan01
#36 patch1.png100.88 KBakashkrishnan01
#33 rewrite-description-for-url-alias-1681300-33.patch908 bytescryt1c
#33 patch.PNG6.77 KBcryt1c
#32 rewrite-url-aliasing-1681300-32.patch908 bytesjoyceg
#32 Fixed.png22.05 KBjoyceg
#31 Rewrite-description-for-URL-alias-1681300-31.patch911 bytessudhanshug
#31 Selection_036.png39.76 KBsudhanshug
#30 Rewrite-description-for-URL-alias-1681300-30.patch0 bytessudhanshug
#29 after edit patch.module.JPG26.1 KBLord_of_Codes
#29 Rewrite-description-for-URL-alias-1681300-29.patch908 bytesLord_of_Codes
#28 rewrite_description_for_url_alias-1681300-28.patch908 bytesssova
#28 rewrite_description_for_url_alias-1681300-28.png8.66 KBssova
#27 rewrite_description_for_url_alias-1681300-27.patch908 bytesnicoleheard
#27 screenshot_url_alias.png17.74 KBnicoleheard
#26 rewrite_description_for_url_alias-1681300-26.patch908 bytesaphickey
#26 Screen Shot 2015-01-14 at 12.38.28 PM.png35.17 KBaphickey
#25 rewrite_description_for_url_alias-1681300-25.patch908 bytespeterjlord
#25 Screenshot from 2014-08-28 17:55:37.png113.5 KBpeterjlord
#24 update-1681300-24.patch1.8 KBzealfire
#23 1681300-rewrite_description_for_url_alias_screenshot.png12.01 KBsrikanthk16
#23 rewrite_description_for_url_alias-1681300-23.patch880 bytessrikanthk16
#22 rewrite_description_for_url_alias-1681300-22.patch125.97 KBAkif Khan akif500
#21 Updated-description-for-URL-alias-on-node-form-1681300-#21.patch908 bytesmarcosdr
#21 issueSolved_node_add.JPG22.95 KBmarcosdr
#20 rewrite_description_for_url_alias-1681300-20.patch908 bytescs_shadow
#19 rewrite-description-url-1681300-19.patch517 bytesandileco
#18 rewrite_description_for_url_alias_on_node_form-1681300-18.patch908 bytesoheller
#18 before_patch.png46.64 KBoheller
#18 after_patch.png37.81 KBoheller
#17 Screen Shot 2013-08-12 at 4.03.11 PM.png64.04 KBbowevil
#17 rewrite-description-for-url-alias-1681306-17.patch908 bytesbowevil
#16 rewrite-description-for-url-alias-1681300-16.patch908 bytesrainbowarray
#16 url-path-text-change.png39.8 KBrainbowarray
#14 rewrite_url_description-1681300-14.patch908 bytestimmvt
#14 rewrite-url-alias-screenshot.png42.43 KBtimmvt
#13 article_rewrite_url_screenshot.png16.82 KBrkeller
#13 rewrite_url_description_1681300_13.patch908 bytesrkeller
#12 rewrite_url_description-1681300-12.patch908 bytesfureigh
#12 1681300-5-screenshot-after-fix.png29.06 KBfureigh
#11 patch.png14.01 KBBrolag
#11 1326088-rewrite-desription-for-url-alias.patch909 bytesBrolag
#10 updated-descirption-url-alias-type-1681300-10.patch909 bytesgeneralconsensus
#9 updated-description-url-alias-1681300-9.patch908 bytesgeneralconsensus
#8 rewrite-url-description-1681300-7.patch908 bytesali_tareque
#7 rewrite-url-description.png7.32 KBali_tareque
#6 rewrite-description-for-url-alias.jpg30.81 KBmcannon
#6 rewrite-url-description-1681300-6.patch908 bytesmcannon
#5 fixing-url-alias-description-test-1681300-5.patch908 bytesnicxvan
#4 rewrite-url-description-1.png31.05 KBadd1sun
#4 rewrite-url-description-1681300-4.patch908 bytesadd1sun
#3 url-text.png71.58 KBadd1sun

Comments

add1sun’s picture

StatusFileSize
new71.58 KB

Yes, I agree the wording is confusing. You can find this text by going to Add content, and then creating a new piece of content. Scroll to the bottom of the page and click the URL Aliases tab. The help text id located under the alias field. See screenshot below.

url help text

add1sun’s picture

Status: Active » Needs review
StatusFileSize
new908 bytes
new31.05 KB

I've updated the text in the attached patch. The screenshot shows the updated text on the site.

nicxvan’s picture

Test

mcannon’s picture

Changed the description field for the URL path field. The screenshot shows the updated text on the node form.

ali_tareque’s picture

Assigned: Unassigned » ali_tareque
StatusFileSize
new7.32 KB

Testing how to create and submit a patch.

ali_tareque’s picture

StatusFileSize
new908 bytes

Attaching the patch file.

Brolag’s picture

StatusFileSize
new909 bytes
new14.01 KB

Attaching patch file.

fureigh’s picture

The attached patch file updates the URL description per the proposed text above. Note that this is different from what is suggested in the Ladder lesson: http://drupalladder.org/lesson/72a836e6-b408-a7a4-1923-8788761b2608

1681300-5-screenshot-after-fix.png

Forgive the awkward arrow.

rkeller’s picture

Attached patch updates the URL description as proposed above. Note this patch was created as a Drupal ladder lesson.
article rewrite url screenshot

timmvt’s picture

The 'Current' URL Alias text has been updated with the 'Proposed' URL Alias text. The patch and screenshot are attached :)

add1sun’s picture

+++ b/core/modules/path/path.moduleundefined
@@ -136,7 +136,7 @@ function path_form_node_form_alter(&$form, $form_state) {
     '#maxlength' => 255,

too long!

+++ b/core/modules/path/path.moduleundefined
@@ -136,7 +136,7 @@ function path_form_node_form_alter(&$form, $form_state) {
-    '#description' => t('Optionally specify an alternative URL by which this content can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'),
+    '#description' => t('The alternative URL for this content. Use a relative path without a trailing slash. For example, type "about" for the about page.'),
   );
   $form['path']['pid'] = array('#type' => 'value', '#value' => $path['pid']);
   $form['path']['source'] = array('#type' => 'value', '#value' => $path['source']);

needs punctuation

rainbowarray’s picture

Created this patch as part of Drupal Ladder.

Here's a screenshot with the updated text:
url-path-text-change.png

bowevil’s picture

Results from the Drupal ladder.

bowevil’s picture

Issue summary: View changes

Updating the issue summary

oheller’s picture

Issue summary: View changes
StatusFileSize
new37.81 KB
new46.64 KB
new908 bytes

I reviewed the URL alias description and agree that the text is confusing. I have attached before and after screenshots along with the patch to update that text.

andileco’s picture

StatusFileSize
new517 bytes

submitting a test patch

cs_shadow’s picture

Submitting a test patch.

marcosdr’s picture

Submitting patch to fix description on URL alias.

Image with fixed issue

Akif Khan akif500’s picture

rewrite_description_for_url_alias-1681300-22

srikanthk16’s picture

#23 updated description for url alias

zealfire’s picture

StatusFileSize
new1.8 KB

Mine first step towards something big.Looking much required help from community members of drupal as i am a beginner.

peterjlord’s picture

The attached patch file updates the URL description per the proposed text above.

aphickey’s picture

Assigned: timmvt » Unassigned
StatusFileSize
new35.17 KB
new908 bytes

The Url tab in the Node add form has been modified to clean up description.

nicoleheard’s picture

Attached is a patch with an updated URL alias description and a screenshot of that update.

ssova’s picture

The patch to update the description for the URL alias and a screenshot of the update.

Lord_of_Codes’s picture

Patch and screenshot included.

sudhanshug’s picture

sudhanshug’s picture

StatusFileSize
new39.76 KB
new911 bytes

patch submitted !

joyceg’s picture

StatusFileSize
new22.05 KB
new908 bytes

The issue has been fixed.
Uploading the screenshot of the fix and the patch here.

cryt1c’s picture

StatusFileSize
new6.77 KB
new908 bytes

The patch changes the description of the URL alias field.

akashkrishnan01’s picture

Title: Rewrite description for URL alias on node/add/* » rewriteUrlAliasing-168100- commentNUmber.patch
Assigned: Unassigned » akashkrishnan01

Added credit

joyceg’s picture

Title: rewriteUrlAliasing-168100- commentNUmber.patch » Rewrite description for URL alias on node/add/*
akashkrishnan01’s picture

StatusFileSize
new100.88 KB
new909 bytes

#36 needs review

franciscojlucero’s picture

StatusFileSize
new7.85 KB
new908 bytes

This is a test patch for the module contribution ladder.

jayly’s picture

Assigned: akashkrishnan01 » jayly
StatusFileSize
new108.49 KB
new877 bytes

pic

joyceg’s picture

anhtq’s picture

Assigned: jayly » Unassigned
Category: Bug report » Task
StatusFileSize
new61.82 KB
new919 bytes

Patch for a GCI task

ragasirtahk’s picture

StatusFileSize
new912 bytes
new38.38 KB
ragasirtahk’s picture

StatusFileSize
new912 bytes
new38.38 KB
Percy101’s picture

StatusFileSize
new912 bytes

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1388780)