First off, thanks for this module! The working parts are really a god send. It is however throwing a few errors.
Notice: Use of undefined constant MENU_MAX_PARTS - assumed 'MENU_MAX_PARTS' in _subdomain_id_from_path() (line 649 of /var/www/mysite/html/sites/all/modules/subdomain/subdomain.module).
Notice: Use of undefined constant MENU_MAX_PARTS - assumed 'MENU_MAX_PARTS' in _subdomain_id_from_path() (line 649 of /var/www/mysite/html/sites/all/modules/subdomain/subdomain.module).
Comments
Comment #1
inventlogic commentedGetting this error as well when I update modules.
Was this fixed as I have the latest version installed?
Comment #2
inventlogic commentedIn the subdomain.module file the function _subdomain_id_from_path on line 594 (approximately) is attempting to use functions and constants defined in the menu.inc include.
I think it is producing errors because the _subdomain_id_from_path is not a hook function so it cannot depend on automatic includes from the underlying main drupal functions the hook is calling.
I tried to fix this error by doing the following:
Edit the subdomain.module file and add after
function _subdomain_id_from_path($type, $path) {the following line:
require_once('includes/menu.inc');I think this works ok but I am not sure it is the correct Drupal way of accessing the menu.inc functions and constants.
The code from the function that is causing the problem is the following
It seems to have been partly snagged from the menu_get_item function
So I suppose the question is can the value of the $router_item be gotten through standard Drupal hook functions?
Any help comments appreciated.
Comment #3
bartezz commentedAdded require_once('includes/menu.inc'); as a temp workaround as mentioned, seems to fix this issue for now but ofcourse prob is just a temp workaround...
Cheers