When trying to execute the path admin/content/node-type/profile/edit, we get the following error:

require_once(sites/all/modules/content_profile/content_types.inc) [function.require-once]: failed to open stream: No such file or directory in drupal/includes/menu.inc on line 347.

The problem is that the corresponding menu entry is defined by node module, that needs content_types.inc in its own module directory, but this menu entry is again defined by content_profile module, and then the menu rebuild replaces the 'module' property of the menu router entry from 'node' to 'content_profile'. This leads the menu system to try to load the 'file' associated to the page callback from the wrong module.

Solution would be to simply remove the re-definition of that menu entry from content_profile implementation of hook_menu(). Note that this is what CCK does, for example.

 function content_profile_menu() {
   $items = array();
 
   //Register a path for each content profile type
   foreach (content_profile_get_types('names') as $type => $typename) {
-    $items['admin/content/node-type/'. str_replace('_', '-', $type) .'/edit'] = array(
-      'title' => 'Edit',
-      'type' => MENU_DEFAULT_LOCAL_TASK,
-    );

Thanks!

Comments

markus_petrux’s picture

Status: Active » Needs review

hmm...