Download & Extend

drupal_valid_path: fix&document OR refactor

Project:Drupal core
Version:8.x-dev
Component:menu system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

when working on #93854: Allow autocompletion requests to include slashes some code zombies sprang into my eye:
* in drupal_valid_path we have a variable that is used but not defined.
* as i am in it, documented the $dynamic_allowed parameter
see attached patch.

when i wondered why noone noticed such a bug ($dynamic_allowed cannot work correctly right now) i noticed
* drupal_valid_path is only called by menu_edit_item_validate in a WRONG way but this only does not result in a bug (that would make it possible to add "node/%" as a link) because of above bug.

it is also possible to KILL the whole $dynamic_allowed parameter, noone is using it.

Comments

#1

AttachmentSizeStatusTest resultOperations
0002-fix-1256978-drupal_valid_path-with-dynamic_allowed-b.patch2.17 KBIdlePASSED: [[SimpleTest]]: [MySQL] 33,641 pass(es).View details | Re-test

#2

Status:active» needs review

#3

Status:needs review» closed (duplicate)

Duplicate of #876580: drupal_valid_path fails for dynamic paths (e.g. user/% cannot be added to menus)

EDIT: Patch added accidentally..

AttachmentSizeStatusTest resultOperations
1256978.patch1.88 KBIgnored: Check issue status.NoneNone