Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
$items['admin/config/development/coder'] = array(
'title' => 'Coder',
'description' => 'Select code review plugins and modules, and upgrade files.',
'access arguments' => array('administer site configuration'),
);
wants to use the system admin page but the inheritance is broken for this case. But it's easy to fix. I bet D6 is broken too.
Comment | File | Size | Author |
---|---|---|---|
#27 | menu_file_inheritance-688334-d6-27.patch | 1019 bytes | Albert Volkman |
#25 | menu_file_inheritance-688334-d6-25.patch | 1019 bytes | Albert Volkman |
#20 | menu-file-inheritance.patch | 3.28 KB | BTMash |
#18 | menu-file-inheritance.patch | 3.28 KB | carlos8f |
#15 | menu_file_path.patch | 1.22 KB | BTMash |
Comments
Comment #1
chx CreditAttribution: chx commentedHere's how to write a test: create a test module with the router item from the issue and one item from coder_upgrade. Then write a simple test which does a drupalGet('admin/config/development/coder') and assert that the latter item is there. When that's done, post the test patch here without the original patch to test pifr fatal detector and then (can be the same time) post the test together with the patch.
Comment #4
carlos8f CreditAttribution: carlos8f commentedmmm. Sounds good, I wasn't even aware that the menu system had this type of inheritance feature. Aren't we glad we have the PIFR fatal detector now? ;)
Comment #5
carlos8f CreditAttribution: carlos8f commentedtagging, needs test
Comment #6
pwolanin CreditAttribution: pwolanin commentedsubscribe
Comment #7
stella CreditAttribution: stella commentedHere's a patch with just the simpletest and not the actual fix. This should fail.
Comment #9
stella CreditAttribution: stella commentedAnd here's the fix plus tests, which should hopefully pass.
Comment #11
rfayJust had this again. It's pretty annoying, and we should be able to get an easy fix in there.
Enabling coder_review resolved the problem, but it shouldn't take a half hour to figure that out.
Comment #12
matt2000 CreditAttribution: matt2000 commented#9: menu_file_path.patch queued for re-testing.
Comment #14
BTMash CreditAttribution: BTMash commentedI applied the patch and tried running it locally as well and have been getting failed results (the patch initially did not apply successfully - some new code must have been added that made the lines where the code would go change - I'm attaching the revised version). I'm trying to figure out where the issue might be at this stage. The issue from the tests seem to be against
and the test exception being 'Undefined index: module'
Comment #15
BTMash CreditAttribution: BTMash commentedForgot to attach patch.
Comment #16
chx CreditAttribution: chx commentedComment #18
carlos8f CreditAttribution: carlos8f commentedNew patch which:
- checks isset() for $item['module'], which isn't present on menu items generated by field_ui for some reason.
- includes test by @stella not in #15, with menu path changed from 'coder' to 'file-inheritance'.
- added a few extra comments.
Comment #19
indytechcook CreditAttribution: indytechcook commentedThis seems to fix inheritance for me.
Comment #20
BTMash CreditAttribution: BTMash commentedI'm not entirely sure why I get a line offset when I patch the file but everything seems to line up correctly (attaching the small revision just in case). The simpletests pass, the menu item chx described comes up correctly, and the tests are well documented so +1 on patch from me.
Comment #21
cleaver CreditAttribution: cleaver commentedI have reviewed the test and it looks good. Patch works and test is successful.
Comment #22
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #24
Pasqualle#248173: menu items do not inherit file path correctly marked as duplicate
D6 is broken too
Comment #25
Albert Volkman CreditAttribution: Albert Volkman commentedD6 backport.
Comment #26
chx CreditAttribution: chx commentedComment #27
Albert Volkman CreditAttribution: Albert Volkman commentedbump (and updated patch so that it applies cleanly)