$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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Here'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.

Status: Needs review » Needs work

The last submitted patch, menu_file_path.patch, failed testing.

Status: Needs work » Needs review

Re-test of menu_file_path.patch from comment @comment was requested by chx.

carlos8f’s picture

mmm. 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? ;)

carlos8f’s picture

Issue tags: +Needs tests

tagging, needs test

pwolanin’s picture

subscribe

stella’s picture

FileSize
1.76 KB

Here's a patch with just the simpletest and not the actual fix. This should fail.

Status: Needs review » Needs work

The last submitted patch, menu_file_path_test.patch, failed testing.

stella’s picture

Status: Needs work » Needs review
FileSize
2.98 KB

And here's the fix plus tests, which should hopefully pass.

Status: Needs review » Needs work

The last submitted patch, menu_file_path.patch, failed testing.

rfay’s picture

Just 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.

matt2000’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests

#9: menu_file_path.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Needs tests

The last submitted patch, menu_file_path.patch, failed testing.

BTMash’s picture

I 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

$item['file path'] = drupal_get_path('module', $parent['module']);

and the test exception being 'Undefined index: module'

BTMash’s picture

FileSize
1.22 KB

Forgot to attach patch.

chx’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, menu_file_path.patch, failed testing.

carlos8f’s picture

Status: Needs work » Needs review
FileSize
3.28 KB

New 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.

indytechcook’s picture

Status: Needs review » Reviewed & tested by the community

This seems to fix inheritance for me.

BTMash’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
3.28 KB

I'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.

cleaver’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed the test and it looks good. Patch works and test is successful.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Pasqualle’s picture

Version: 7.x-dev » 6.x-dev
Status: Closed (fixed) » Patch (to be ported)

#248173: menu items do not inherit file path correctly marked as duplicate

D6 is broken too

Albert Volkman’s picture

Status: Patch (to be ported) » Needs review
FileSize
1019 bytes

D6 backport.

chx’s picture

Assigned: chx » Unassigned
Albert Volkman’s picture

bump (and updated patch so that it applies cleanly)

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.