Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
node system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2007 at 12:41 UTC
Updated:
10 Oct 2007 at 15:41 UTC
Hi,
I'm porting the faq module to Drupal 6.x. I've gone through the Converting 5.x modules to 6.x document, but haven't found anything about a new requirement for a "nodes.pages.inc" file for modules that create their own content types. I'm getting the error below:
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/faq/node.pages.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupal_6.1_20070904/html/includes/menu.inc on line 312
Is this a bug? Or is there a new requirement for a nodes.pages.inc file? If so, can anyone provide more details on what exactly this file should contain?
Cheers,
Stella
Comments
Comment #1
stella commentedChanging priority to critical in case this is a bug in drupal core. Feel free to lower the priority if it's not and it's just a documentation issue.
Cheers,
Stella
Comment #2
yched commentedSounds like a wrong copy/paste in you module's hook_menu. One of your menu items probably has a
'file' => 'node.pages.inc'property, which incorrectly tells the menu system that the callback for this item resides in a node.pages.inc file in your module's directory.Comment #3
stella commentednope, I don't have that in my hook_menu() function, or anywhere in faq.module for that matter. The code is all checked into CVS in case you want to verify that, but I've pasted my hook_menu() function below.
Cheers,
Stella
Comment #4
yched commentedThen I guess it would help if you specified on which page exactly you get the error.
Also, have you tried to force a menu rebuild ? (menu_rebuild() using devel.module's PHp block, or temporarily insert menu_rebuild() after drupal_bootstrap() in index.php, or simply disable/enable a module on the modules admin page).
The bug could be caused by a previous state of your code during your upgrade work, wich might still reside in the menu data.
Comment #5
Crell commentedThe new page-split mechanism is documented as part of the menu documentation: http://drupal.org/node/146172
As yched said, we'll need to know what page it is that's misbehaving. From the menu hook below, I am going to guess that it's the node/add/faq page? If so, that sounds like a problem with the inheritance logic. Let us know. ;-)
Comment #6
eaton commentedShould modules be implementing their node/foo/add path manually at all? Doesn't the node system handle that path automatically?
Comment #7
Crell commentedYa know, I think eaton's right. snpower, try removing that menu hook completely and refreshing the menu. See if that works.
Comment #8
yched commentedTrue in fact. Item 20 on the Converting 5.x modules to 6.x handbook page sort of says that.
Maybe it should be made clearer that node/add/foo is to be *removed* from modules hook_menu ?
Comment #9
Crell commentedI have updated the module update page accordingly.
snpower, does any of this help with your issue? :-)
Comment #10
stella commentedI was having the problem on "node/add/faq". Removing that code from my faq_hook() and disabling/re-enabling the module fixed the problem.
I just noticed you updated the documentation. Thanks, it does make it much clearer now.
Cheers,
Stella
Comment #11
(not verified) commented