Hi All, I am in Chapter 2 of Tomlinson's et al book about Pro Drupal 7 Development. Get the following error upon completion of the code: *Warning*: require_once(/home3/tonymacc/public_html/drupal-7.0/modules/system/annotate.admin.inc) [function.require-oncehttp://tony-mac.com/drupal-7.0/admin/function.require-once]: failed to open stream: No such file or directory in * menu_execute_active_handler()* (line *499* of * /home3/tonymacc/public_html/drupal-7.0/includes/menu.inc*).
Grateful for any pointers.
Thanks Tony
Guessing "annotate" is the name of your module. Is it installed in the modules/system folder? Should really be in sites/all/modules/myprojectname.
One common mistake is when moving files around when you're first learning how to develop is to leave a copy of your module in another folder. When you do this, drupal might find that old copy first. If it does that it will be looking for annotate.admin.inc in the wrong location.
My guess here is that you implemented a menu_hook that references an include file (annotate.adin.inc ).
Make sure any duplicate/old module files are removed and then clear your caches. You might also need to save changes to the module list to make sure the system table (which keeps track of where modules are installed) gets updated with the correct location of your module file.
Am I near the mark?
Dave
________________________________
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of tony maciejowski Sent: Thursday, June 09, 2011 11:04 PM To: support@drupal.org Subject: [support] Writing a module and get an error
Hi All, I am in Chapter 2 of Tomlinson's et al book about Pro Drupal 7 Development. Get the following error upon completion of the code: Warning: require_once(/home3/tonymacc/public_html/drupal-7.0/modules/system/annot ate.admin.inc) [function.require-once http://tony-mac.com/drupal-7.0/admin/function.require-once ]: failed to open stream: No such file or directory in menu_execute_active_handler() (line 499 of /home3/tonymacc/public_html/drupal-7.0/includes/menu.inc).
Grateful for any pointers.
Thanks Tony
Not installed in modules/system folder. Dir structure as follows: sites/all/modules/annotate/
- annotate.admin.inc - annotate.install
sites/all/modules/custom/annotate/
- annotate.info - annotate.module
The book was a bit confusing as to where the files should go. Should they all be in one or the other of these dirs and not split between the 2?
Thanks ... yes near the mark. Tony
On Fri, Jun 10, 2011 at 9:05 AM, Metzler, David metzlerd@evergreen.eduwrote:
Guessing “annotate” is the name of your module. Is it installed in the modules/system folder? Should really be in sites/all/modules/myprojectname.
One common mistake is when moving files around when you’re first learning how to develop is to leave a copy of your module in another folder. When you do this, drupal might find that old copy first. If it does that it will be looking for annotate.admin.inc in the wrong location.
My guess here is that you implemented a menu_hook that references an include file (annotate.adin.inc ).
Make sure any duplicate/old module files are removed and then clear your caches. You might also need to save changes to the module list to make sure the system table (which keeps track of where modules are installed) gets updated with the correct location of your module file.
Am I near the mark?
Dave
*From:* support-bounces@drupal.org [mailto:support-bounces@drupal.org] *On Behalf Of *tony maciejowski *Sent:* Thursday, June 09, 2011 11:04 PM *To:* support@drupal.org *Subject:* [support] Writing a module and get an error
Hi All, I am in Chapter 2 of Tomlinson's et al book about Pro Drupal 7 Development. Get the following error upon completion of the code: *Warning*: require_once(/home3/tonymacc/public_html/drupal-7.0/modules/system/annotate.admin.inc) [function.require-oncehttp://tony-mac.com/drupal-7.0/admin/function.require-once]: failed to open stream: No such file or directory in * menu_execute_active_handler()* (line *499* of * /home3/tonymacc/public_html/drupal-7.0/includes/menu.inc*).
Grateful for any pointers.
Thanks Tony
--
*tony maciejowski** | analyst/programmer | websites | tony@tony-mac.comt_maciejowski@hotmail.com
*O*ffice: 323.***.5137 | Cell: 323.***.6206 | Germany: 49-30-76764897
-- [ Drupal support list | http://lists.drupal.org/ ]
Yes, they should all be in the same directory. All includes are relative to the location of the .info and .module files. And the .install file will need to be in the same folder as well. Think of the name of the containing folder as the name of the project which can house multiple modules if you wish. It often has the same name as the module but not always. A possible listing might be
--- sites/all/modules/annotation
annotate.admin.inc
annotate.install
annotate.module
annotate.info
annotate_manager.module
annotate_manager.info
annotate_manager.admin.inc
annotate_manager.install
I invented the concept of an annotate_manager module in the same directory just to drive the point home. I intentionally made the name of the containing folder different, just to point out that it has no relation to the module names, but it is normally the same as the base module name.
You can also deploy these folders at any depth within your sites/all/modules folder. So if you want to keep all your custom modules together in a
Sites/all/modules/custom folder instead, have at it. But do keep the module files together in one folder. In that case all these files would live in
Sites/all/modules/custom/annotation instead.
Make sense?
________________________________
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of tony maciejowski Sent: Friday, June 10, 2011 10:12 AM To: support@drupal.org Subject: Re: [support] Writing a module and get an error
Not installed in modules/system folder. Dir structure as follows: sites/all/modules/annotate/
* annotate.admin.inc * annotate.install
sites/all/modules/custom/annotate/
* annotate.info * annotate.module
The book was a bit confusing as to where the files should go. Should they all be in one or the other of these dirs and not split between the 2?
Thanks ... yes near the mark. Tony
On Fri, Jun 10, 2011 at 9:05 AM, Metzler, David metzlerd@evergreen.edu wrote:
Guessing "annotate" is the name of your module. Is it installed in the modules/system folder? Should really be in sites/all/modules/myprojectname.
One common mistake is when moving files around when you're first learning how to develop is to leave a copy of your module in another folder. When you do this, drupal might find that old copy first. If it does that it will be looking for annotate.admin.inc in the wrong location.
My guess here is that you implemented a menu_hook that references an include file (annotate.adin.inc ).
Make sure any duplicate/old module files are removed and then clear your caches. You might also need to save changes to the module list to make sure the system table (which keeps track of where modules are installed) gets updated with the correct location of your module file.
Am I near the mark?
Dave
________________________________
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of tony maciejowski Sent: Thursday, June 09, 2011 11:04 PM To: support@drupal.org Subject: [support] Writing a module and get an error
Hi All, I am in Chapter 2 of Tomlinson's et al book about Pro Drupal 7 Development. Get the following error upon completion of the code: Warning: require_once(/home3/tonymacc/public_html/drupal-7.0/modules/system/annot ate.admin.inc) [function.require-once http://tony-mac.com/drupal-7.0/admin/function.require-once ]: failed to open stream: No such file or directory in menu_execute_active_handler() (line 499 of /home3/tonymacc/public_html/drupal-7.0/includes/menu.inc).
Grateful for any pointers.
Thanks Tony
Capito. Thanks.
Sent on the Sprint® Now Network from my BlackBerry®
-----Original Message----- From: "Metzler, David" metzlerd@evergreen.edu Sender: support-bounces@drupal.org Date: Fri, 10 Jun 2011 10:54:34 To: support@drupal.org Reply-To: support@drupal.org Subject: Re: [support] Writing a module and get an error
Thanks but still getting this error: *Fatal error*: require_once() [function.requirehttp://www.tony-mac.com/drupal-7.0/admin/config/annotate/function.require]: Failed opening required '/home3/tonymacc/public_html/drupal-7.0/modules/system/annotate.admin.inc' (include_path='.:/usr/lib64/php:/usr/lib/php') in * /home3/tonymacc/public_html/drupal-7.0/includes/menu.inc* on line *499
**Why is the function in menu.inc looking for *annotate.admin.inc* in * /modules/system/? Here line 499 in menu.inc:
// Only continue if the site status is not set. if ($page_callback_result == MENU_SITE_ONLINE) { // Rebuild if we know it's needed, or if the menu masks are missing which // occurs rarely, likely due to a race condition of multiple rebuilds. if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) { menu_rebuild(); } if ($router_item = menu_get_item($path)) { if ($router_item['access']) { if ($router_item['include_file']) { require_once DRUPAL_ROOT . '/' . $router_item['include_file']; } $page_callback_result = call_user_func_array($router_item['page_callback'], $router_item['page_arguments']); } else { $page_callback_result = MENU_ACCESS_DENIED; } } else { $page_callback_result = MENU_NOT_FOUND; } }
I completely uninstalled the module from the server and then recreated it. Flush caches, saved module list. Stood on my head for an hour .... same error every time. Tony
On Fri, Jun 10, 2011 at 10:54 AM, Metzler, David metzlerd@evergreen.eduwrote:
Yes, they should all be in the same directory. All includes are relative to the location of the .info and .module files. And the .install file will need to be in the same folder as well. Think of the name of the containing folder as the name of the project which can house multiple modules if you wish. It often has the same name as the module but not always. A possible listing might be
--- sites/all/modules/annotation
annotate.admin.inc
annotate.install
annotate.module
annotate.info
annotate_manager.module
annotate_manager.info
annotate_manager.admin.inc
annotate_manager.install
I invented the concept of an annotate_manager module in the same directory just to drive the point home. I intentionally made the name of the containing folder different, just to point out that it has no relation to the module names, but it is normally the same as the base module name.
You can also deploy these folders at any depth within your sites/all/modules folder. So if you want to keep all your custom modules together in a
Sites/all/modules/custom folder instead, have at it. But do keep the module files together in one folder. In that case all these files would live in
Sites/all/modules/custom/annotation instead.
Make sense?
*From:* support-bounces@drupal.org [mailto:support-bounces@drupal.org] *On Behalf Of *tony maciejowski *Sent:* Friday, June 10, 2011 10:12 AM *To:* support@drupal.org *Subject:* Re: [support] Writing a module and get an error
Not installed in modules/system folder. Dir structure as follows: sites/all/modules/annotate/
- annotate.admin.inc
- annotate.install
sites/all/modules/custom/annotate/
- annotate.info
- annotate.module
The book was a bit confusing as to where the files should go. Should they all be in one or the other of these dirs and not split between the 2?
Thanks ... yes near the mark. Tony
On Fri, Jun 10, 2011 at 9:05 AM, Metzler, David metzlerd@evergreen.edu wrote:
Guessing “annotate” is the name of your module. Is it installed in the modules/system folder? Should really be in sites/all/modules/myprojectname.
One common mistake is when moving files around when you’re first learning how to develop is to leave a copy of your module in another folder. When you do this, drupal might find that old copy first. If it does that it will be looking for annotate.admin.inc in the wrong location.
My guess here is that you implemented a menu_hook that references an include file (annotate.adin.inc ).
Make sure any duplicate/old module files are removed and then clear your caches. You might also need to save changes to the module list to make sure the system table (which keeps track of where modules are installed) gets updated with the correct location of your module file.
Am I near the mark?
Dave
*From:* support-bounces@drupal.org [mailto:support-bounces@drupal.org] *On Behalf Of *tony maciejowski *Sent:* Thursday, June 09, 2011 11:04 PM *To:* support@drupal.org *Subject:* [support] Writing a module and get an error
Hi All, I am in Chapter 2 of Tomlinson's et al book about Pro Drupal 7 Development. Get the following error upon completion of the code: *Warning*: require_once(/home3/tonymacc/public_html/drupal-7.0/modules/system/annotate.admin.inc) [function.require-oncehttp://tony-mac.com/drupal-7.0/admin/function.require-once]: failed to open stream: No such file or directory in * menu_execute_active_handler()* (line *499* of * /home3/tonymacc/public_html/drupal-7.0/includes/menu.inc*).
Grateful for any pointers.
Thanks Tony
--
*tony maciejowski** | analyst/programmer | websites | tony@tony-mac.comt_maciejowski@hotmail.com
*O*ffice: 323.***.5137 | Cell: 323.***.6206 | Germany: 49-30-76764897
-- [ Drupal support list | http://lists.drupal.org/ ]
--
*tony maciejowski** | analyst/programmer | websites | tony@tony-mac.comt_maciejowski@hotmail.com
*O*ffice: 323.463.5137 | Cell: 323.899.6206 | Germany: 49-30-76764897
-- [ Drupal support list | http://lists.drupal.org/ ]
What is the menu path that is getting this error? Perhaps you could grep this code for it? Could you share the menu_hook implementation for this module? It's hard to help without specifics.
Also, examine the contents of your system table and see if there is another reference to an annotate module.
________________________________
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of tony maciejowski Sent: Friday, June 10, 2011 2:51 PM To: support@drupal.org Subject: Re: [support] Writing a module and get an error
Thanks but still getting this error: Fatal error: require_once() [function.require http://www.tony-mac.com/drupal-7.0/admin/config/annotate/function.requi re ]: Failed opening required '/home3/tonymacc/public_html/drupal-7.0/modules/system/annotate.admin.in c' (include_path='.:/usr/lib64/php:/usr/lib/php') in /home3/tonymacc/public_html/drupal-7.0/includes/menu.inc on line 499
Why is the function in menu.inc looking for annotate.admin.inc in /modules/system/? Here line 499 in menu.inc:
// Only continue if the site status is not set. if ($page_callback_result == MENU_SITE_ONLINE) { // Rebuild if we know it's needed, or if the menu masks are missing which // occurs rarely, likely due to a race condition of multiple rebuilds. if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) { menu_rebuild(); } if ($router_item = menu_get_item($path)) { if ($router_item['access']) { if ($router_item['include_file']) { require_once DRUPAL_ROOT . '/' . $router_item['include_file']; } $page_callback_result = call_user_func_array($router_item['page_callback'], $router_item['page_arguments']); } else { $page_callback_result = MENU_ACCESS_DENIED; } } else { $page_callback_result = MENU_NOT_FOUND; } }
I completely uninstalled the module from the server and then recreated it. Flush caches, saved module list. Stood on my head for an hour .... same error every time. Tony
On Fri, Jun 10, 2011 at 10:54 AM, Metzler, David metzlerd@evergreen.edu wrote:
Yes, they should all be in the same directory. All includes are relative to the location of the .info and .module files. And the .install file will need to be in the same folder as well. Think of the name of the containing folder as the name of the project which can house multiple modules if you wish. It often has the same name as the module but not always. A possible listing might be
--- sites/all/modules/annotation
annotate.admin.inc
annotate.install
annotate.module
annotate.info
annotate_manager.module
annotate_manager.info
annotate_manager.admin.inc
annotate_manager.install
I invented the concept of an annotate_manager module in the same directory just to drive the point home. I intentionally made the name of the containing folder different, just to point out that it has no relation to the module names, but it is normally the same as the base module name.
You can also deploy these folders at any depth within your sites/all/modules folder. So if you want to keep all your custom modules together in a
Sites/all/modules/custom folder instead, have at it. But do keep the module files together in one folder. In that case all these files would live in
Sites/all/modules/custom/annotation instead.
Make sense?
________________________________
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of tony maciejowski Sent: Friday, June 10, 2011 10:12 AM To: support@drupal.org Subject: Re: [support] Writing a module and get an error
Not installed in modules/system folder. Dir structure as follows: sites/all/modules/annotate/
* annotate.admin.inc * annotate.install
sites/all/modules/custom/annotate/
* annotate.info * annotate.module
The book was a bit confusing as to where the files should go. Should they all be in one or the other of these dirs and not split between the 2?
Thanks ... yes near the mark. Tony
On Fri, Jun 10, 2011 at 9:05 AM, Metzler, David metzlerd@evergreen.edu wrote:
Guessing "annotate" is the name of your module. Is it installed in the modules/system folder? Should really be in sites/all/modules/myprojectname.
One common mistake is when moving files around when you're first learning how to develop is to leave a copy of your module in another folder. When you do this, drupal might find that old copy first. If it does that it will be looking for annotate.admin.inc in the wrong location.
My guess here is that you implemented a menu_hook that references an include file (annotate.adin.inc ).
Make sure any duplicate/old module files are removed and then clear your caches. You might also need to save changes to the module list to make sure the system table (which keeps track of where modules are installed) gets updated with the correct location of your module file.
Am I near the mark?
Dave
________________________________
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of tony maciejowski Sent: Thursday, June 09, 2011 11:04 PM To: support@drupal.org Subject: [support] Writing a module and get an error
Hi All, I am in Chapter 2 of Tomlinson's et al book about Pro Drupal 7 Development. Get the following error upon completion of the code: Warning: require_once(/home3/tonymacc/public_html/drupal-7.0/modules/system/annot ate.admin.inc) [function.require-once http://tony-mac.com/drupal-7.0/admin/function.require-once ]: failed to open stream: No such file or directory in menu_execute_active_handler() (line 499 of /home3/tonymacc/public_html/drupal-7.0/includes/menu.inc).
Grateful for any pointers.
Thanks Tony
Thanks. Will do later tonite (Left Coast time).
Sent on the Sprint® Now Network from my BlackBerry®
-----Original Message----- From: "Metzler, David" metzlerd@evergreen.edu Sender: support-bounces@drupal.org Date: Fri, 10 Jun 2011 16:36:40 To: support@drupal.org Reply-To: support@drupal.org Subject: Re: [support] Writing a module and get an error
I am working my way thru the errors in tghe code. Previous error was caused by callback being spelled with on 'l' and not 2. Now the error is " *Fatal error*: Unsupported operand types in * /home3/tonymacc/public_html/drupal-7.0/includes/form.inc* on line *1682" and **Notice*: Array to string conversion in *form_builder()* (line *1769* of * /home3/tonymacc/public_html/drupal-7.0/includes/form.inc*). * Rather than wasting your time can you point me to a good free debugger for php. php is new to meee * T.
On Fri, Jun 10, 2011 at 5:19 PM, tonio tony@tony-mac.com wrote:
Thanks. Will do later tonite (Left Coast time).
Sent on the Sprint® Now Network from my BlackBerry®
-----Original Message----- From: "Metzler, David" metzlerd@evergreen.edu Sender: support-bounces@drupal.org Date: Fri, 10 Jun 2011 16:36:40 To: support@drupal.org Reply-To: support@drupal.org Subject: Re: [support] Writing a module and get an error
-- [ Drupal support list | http://lists.drupal.org/ ]
I am using only DW. Should I be using Eclipse to develop. I assume there is a Drupal plug-in. T. Sent on the Sprint® Now Network from my BlackBerry®
-----Original Message----- From: "Metzler, David" metzlerd@evergreen.edu Sender: support-bounces@drupal.org Date: Fri, 10 Jun 2011 16:36:40 To: support@drupal.org Reply-To: support@drupal.org Subject: Re: [support] Writing a module and get an error
I use eclipse, no d6 plugin, but if you configure it to treat .module files and .inc files as php, it works pretty well.
-----Original Message----- From: support-bounces@drupal.org on behalf of tonio Sent: Sat 6/11/2011 06:21 To: support@drupal.org Subject: Re: [support] Writing a module and get an error
I am using only DW. Should I be using Eclipse to develop. I assume there is a Drupal plug-in. T. Sent on the Sprint® Now Network from my BlackBerry®
-----Original Message----- From: "Metzler, David" metzlerd@evergreen.edu Sender: support-bounces@drupal.org Date: Fri, 10 Jun 2011 16:36:40 To: support@drupal.org Reply-To: support@drupal.org Subject: Re: [support] Writing a module and get an error
On Sat, 2011-06-11 at 13:21 +0000, tonio wrote:
I am using only DW. Should I be using Eclipse to develop. I assume there is a Drupal plug-in. T.
eclipse plugin is here D7 & D6, I assume only contain template plugin (.xml), havent check it further, http://drupal.org/project/eclipse
configuring eclipse is here http://drupal.org/node/75242
if u want to use PDT i recommend downloading the Platform first http://download.eclipse.org/eclipse/downloads/drops/R-3.6.2-201102101200/ind... look for "Platform Runtime Binaries" then add PDT (for php) and WPT (for css and stuff)
i tried eclipse from my linux distro once, and it was buggy, the original is better.
if you want to try eclipse that is :)
fireh