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
#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 bytesfrankelpotamus
#37 patch.png7.85 KBfrankelpotamus
#36 rewriteUrlAliasing-168100-36.patch909 bytesakashkrishnan
#36 patch1.png100.88 KBakashkrishnan
#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 bytesplord
#25 Screenshot from 2014-08-28 17:55:37.png113.5 KBplord
#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 bytesmdrummond
#16 url-path-text-change.png39.8 KBmdrummond
#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
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

add1sun’s picture

FileSize
71.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
FileSize
908 bytes
31.05 KB

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

nicxvan’s picture

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
FileSize
7.32 KB

Testing how to create and submit a patch.

ali_tareque’s picture

Attaching the patch file.

generalconsensus’s picture

generalconsensus’s picture

Brolag’s picture

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

mdrummond’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

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

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

zealfire’s picture

FileSize
1.8 KB

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

plord’s picture

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

aphickey’s picture

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

patch submitted !

joyceg’s picture

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

Cryt1c’s picture

The patch changes the description of the URL alias field.

akashkrishnan’s picture

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

Added credit

joyceg’s picture

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

FileSize
100.88 KB
909 bytes

#36 needs review

frankelpotamus’s picture

This is a test patch for the module contribution ladder.

jayly’s picture

joyceg’s picture