0

On a site I did not originally develop, I'm stuck having to fix display issues on an arbitrary page.

Is there a way to locate the custom built module responsible or the source of a given URL path?

4
  • Do a search on code base with url pattern.. Commented Jan 17, 2014 at 11:48
  • And what about URLs generated by Views, Panels and such...? Commented Jan 17, 2014 at 12:07
  • @Batandwa Each of those would be different - can you update the question with some more details please? i.e excactly what paths you're trying to find, how you've created those paths, what you've tried so far to find them, exactly where you're struggling, and generally more details on yuor problem. At the moment this is rather a broad request and I suspect it'll be closed as such eventually Commented Jan 17, 2014 at 14:24
  • In hind sight, I suppose Views and Panel paths would be easy to spot when logged in as user 1. I've added some background to the question. @Payou's answer, with some modifications, seems to have gotten me there. Commented Jan 17, 2014 at 14:54

1 Answer 1

1

You can use "hook_menu_alter" to list all routes and you can see the module via the module key.

function HOOK_menu_alter(&$items) { if(isset($items['yoururlpattern'])){ drupal_set_message($items['yoururlpattern']['module']); } } 
1
  • Thanks. I modified the script a bit to match URLs that might have arguments, for future use - a fuzzy search of sorts. My final script is in this Gist. Commented Jan 17, 2014 at 14:57

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.