Admin area where users are able to make menu edit changes to menu links e.g. /admin/structure/menu/manage/main seem to break core functionality when appending the forward slash to node references. The following steps will recreate the issue.
Steps to recreate:
1. Visit admin/config/search/path
2. Click on the ‘edit’ operation, assuming there are existing menu links created.
3. Append the 'System path' field value with the forward slash character ’/‘. e.g. /node/1 will become /node/1/
4. Save the changes.
5. Visit any page that contains the main menu and you’ll notice the url alias no longer working. The link will now reference the node path with the ‘/‘ prepended.
Note: Please be sure to disable all all caches, and will need to re-save #3(no edits) in order for the '/' to be stripped, as the '/' is stored in the database.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 3150472-nr-bot.txt | 144 bytes | needs-review-queue-bot |
| #15 | 3150472-11.patch | 5.85 KB | nishat ahmad |
| #13 | after-patch-2.png | 49.26 KB | sulfikar_s |
| #13 | after-patch-1.png | 14.49 KB | sulfikar_s |
| #13 | before-patch-2.png | 39.7 KB | sulfikar_s |
Issue fork drupal-3150472
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cm0dit commentedComment #3
durgeshs commentedComment #4
durgeshs commentedPlease review it.
Comment #5
durgeshs commentedComment #6
pankaj.singh commentedComment #7
pankaj.singh commentedTested the patch, It works successfully on my end. The forwards slash "/" that was appended earlier is getting trimmed post applying the patch and URL alias "/about" is working.
Please refer to the SS attached for ref. RTBC+1
Comment #9
ranjith_kumar_k_u commentedThe last patch failed to apply on 9.1 dev ,re-rolled for 9.1
Comment #10
spokjePatch #9 failed Custom Commands
Comment #11
anmolgoyal74 commentedComment #13
sulfikar_s commentedHello,
I've applied the #11 patch on 9.1.x-dev and it applied cleanly. The CSS issue is fixed in this patch.
Now the appended slash '/', is stripped after re-saving it.
I'm attaching the screenshots below,
Before patch,
After patch,
So changing the status to RTBC.
Comment #14
catchThis seems unrelated to the change - why is it necessary to make the test pass?
I'm wondering if we should have an a post update to strip trailing slashes from the paths in path aliases and menu links.
Comment #15
nishat ahmad commentedI have generated this issues and the applying patch, It works successfully on my end.
The forward slash "/" that was appended earlier is getting trimmed post applying the patch and URL alias "/home" is working.
Comment #16
dhirendra.mishra commentedComment #20
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.