Call to undefined function node_get_types()
I've been running a Drupal installation for about a year on a shared HostPC server. Today, my MySQL database overloaded. I submitted a help ticket and they suspended my site; apparently the cause was the chatroom.module script. I disabled it via the database and the unsuspended my account. It worked for about half an hour, and then suddenly no pages would load and all I got was the WSOD error:
Call to undefined function node_get_types() in /includes/theme.inc on line 272I tried to re-enable chatroom.module from the database, thinking that maybe disabling it from the database had caused the problem. Instead, my account got automatically re-suspended and it didn't help anything. Needless to say I disabled chatroom again. I asked the owner to unlock my account and he pointed me to the block_refresh module which I've now disabled... still waiting for a reply on that one.
The only thing I did between the site being unsuspended and re-suspended was set the Chatroom menu item to 'disabled.'
Any idea what caused this problem or how I could fix it? This is killing me. I've had issues with my site all day, and I'm now locked out of my account until HostPC's owner decides to unlock me.
:(
Thanks in advance.

Is it possible your Node
Is it possible your Node module got disabled somehow?
HillsWeb.com
My system table in the
My system table in the database says otherwise.
If you disable it, the error
If you disable it, the error will go away, and you'll see your site (with no node functionality) OR it'll be some other error. Both cases would be good for diagnostics.
So far it looks like your node.module got corrupt. Aren't you running low on space in your hosting account?
HillsWeb.com
.
I tried disabling node.module, and I got this error instead:
Fatal error: Call to undefined function user_access() in /includes/theme.inc on line 283Both errors have to do with theme.inc it appears. I tried switching the theme to Garland (I was using pixture) and I got the same result. Thoughts?
Both errors are missing
Both errors are missing functions that are called in theme.inc, no matter what theme you use. The functions should be declared earlier, the first one in node.mode. When you disable node.mode, it's not called, but it stumbles upon user_access() that is declared in user.module. It looks like core drupal modules are not loaded? Can you check if your main ./module directory is alright, with all the modules in good order? Or, could it be a problem somwhere in bootstrap.inc or module.inc?
// If it were my site, i would probably put something like
var_dump($list);exit;
just before
if ($sort) {in module_list() in module.inc to quickly get some cluesHillsWeb.com
It looks like it's working...
Here's what I get. 'node_guestbook' and 'pa' are custom modules not contributed to d.o. Both of them don't really do anything other than add blocks.
array(118) {["nodefamily"]=>
string(10) "nodefamily"
["birthdays"]=>
string(9) "birthdays"
["nodeprofile"]=>
string(11) "nodeprofile"
["acl"]=>
string(3) "acl"
["activity"]=>
string(8) "activity"
["commentactivity"]=>
string(15) "commentactivity"
["nodeactivity"]=>
string(12) "nodeactivity"
["user_relationshipsactivity"]=>
string(26) "user_relationshipsactivity"
["addthis"]=>
string(7) "addthis"
["admin_menu"]=>
string(10) "admin_menu"
["advanced_profile"]=>
string(16) "advanced_profile"
["nodeprofile_helper"]=>
string(18) "nodeprofile_helper"
["aggregator"]=>
string(10) "aggregator"
["avatar_selection"]=>
string(16) "avatar_selection"
["block"]=>
string(5) "block"
["blog"]=>
string(4) "blog"
["captcha"]=>
string(7) "captcha"
["image_captcha"]=>
string(13) "image_captcha"
["content"]=>
string(7) "content"
["number"]=>
string(6) "number"
["optionwidgets"]=>
string(13) "optionwidgets"
["text"]=>
string(4) "text"
["coder"]=>
string(5) "coder"
["color"]=>
string(5) "color"
["comment"]=>
string(7) "comment"
["comment_page"]=>
string(12) "comment_page"
["comment_upload"]=>
string(14) "comment_upload"
["contact"]=>
string(7) "contact"
["email_confirm"]=>
string(13) "email_confirm"
["email_verify"]=>
string(12) "email_verify"
["emimport"]=>
string(8) "emimport"
["image_ncck"]=>
string(10) "image_ncck"
["video_cck"]=>
string(9) "video_cck"
["emfield"]=>
string(7) "emfield"
["facebook_status"]=>
string(15) "facebook_status"
["filter"]=>
string(6) "filter"
["forum"]=>
string(5) "forum"
["forward"]=>
string(7) "forward"
["guestbook"]=>
string(9) "guestbook"
["html_to_text"]=>
string(12) "html_to_text"
["image_attach"]=>
string(12) "image_attach"
["image_gallery"]=>
string(13) "image_gallery"
["image"]=>
string(5) "image"
["inactive_user"]=>
string(13) "inactive_user"
["invite"]=>
string(6) "invite"
["javascript_aggregator"]=>
string(21) "javascript_aggregator"
["jquery_interface"]=>
string(16) "jquery_interface"
["jquery_update"]=>
string(13) "jquery_update"
["logintoboggan"]=>
string(13) "logintoboggan"
["mail_edit"]=>
string(9) "mail_edit"
["menu"]=>
string(4) "menu"
["messagefx"]=>
string(9) "messagefx"
["node"]=>
string(4) "node"
["node_guestbook"]=>
string(14) "node_guestbook"
["og"]=>
string(2) "og"
["ogactivity"]=>
string(10) "ogactivity"
["og_subgroups"]=>
string(12) "og_subgroups"
["pa"]=>
string(2) "pa"
["panels_simple_cache"]=>
string(19) "panels_simple_cache"
["panels_views"]=>
string(12) "panels_views"
["path"]=>
string(4) "path"
["poll"]=>
string(4) "poll"
["porterstemmer"]=>
string(13) "porterstemmer"
["print"]=>
string(5) "print"
["privatemsg"]=>
string(10) "privatemsg"
["profile"]=>
string(7) "profile"
["quote"]=>
string(5) "quote"
["relatedlinks"]=>
string(12) "relatedlinks"
["search"]=>
string(6) "search"
["search404"]=>
string(9) "search404"
["signature_forum"]=>
string(15) "signature_forum"
["smileys"]=>
string(7) "smileys"
["statistics"]=>
string(10) "statistics"
["subform_element"]=>
string(15) "subform_element"
["subscriptions"]=>
string(13) "subscriptions"
["subscriptions_blog_ui"]=>
string(21) "subscriptions_blog_ui"
["subscriptions_mail"]=>
string(18) "subscriptions_mail"
["subscriptions_taxonomy"]=>
string(22) "subscriptions_taxonomy"
["subscriptions_ui"]=>
string(16) "subscriptions_ui"
["subscriptions_og"]=>
string(16) "subscriptions_og"
["system"]=>
string(6) "system"
["tagadelic"]=>
string(9) "tagadelic"
["taxonomy"]=>
string(8) "taxonomy"
["themesettingsapi"]=>
string(16) "themesettingsapi"
["tinymce"]=>
string(7) "tinymce"
["tracker2"]=>
string(8) "tracker2"
["update_status"]=>
string(13) "update_status"
["upload"]=>
string(6) "upload"
["user"]=>
string(4) "user"
["username_check"]=>
string(14) "username_check"
["userpoints"]=>
string(10) "userpoints"
["userpoints_basic"]=>
string(16) "userpoints_basic"
["userpoints_views"]=>
string(16) "userpoints_views"
["userpoints_invite"]=>
string(17) "userpoints_invite"
["user_relationship_blocks"]=>
string(24) "user_relationship_blocks"
["user_relationship_invites"]=>
string(25) "user_relationship_invites"
["user_relationship_privatemsg"]=>
string(28) "user_relationship_privatemsg"
["user_relationship_views"]=>
string(23) "user_relationship_views"
["user_relationships"]=>
string(18) "user_relationships"
["user_stats"]=>
string(10) "user_stats"
["views_rss"]=>
string(9) "views_rss"
["views_ui"]=>
string(8) "views_ui"
["watchdog"]=>
string(8) "watchdog"
["wordfilter"]=>
string(10) "wordfilter"
["wwsgd"]=>
string(5) "wwsgd"
["og_access"]=>
string(9) "og_access"
["pathauto"]=>
string(8) "pathauto"
["search_config"]=>
string(13) "search_config"
["subscriptions_content"]=>
string(21) "subscriptions_content"
["forum_access"]=>
string(12) "forum_access"
["fieldgroup"]=>
string(10) "fieldgroup"
["advanced_forum"]=>
string(14) "advanced_forum"
["nodewords"]=>
string(9) "nodewords"
["panels"]=>
string(6) "panels"
["panels_page"]=>
string(11) "panels_page"
["token"]=>
string(5) "token"
["views"]=>
string(5) "views"
["globalredirect"]=>
string(14) "globalredirect"
}
It means all the core
It means all the core modules are found and listed. How unexpected :/
I would try revercing all previous changing and then replacing function module_load_all() in module.inc to
function module_load_all() {foreach (module_list(TRUE, FALSE) as $module) {
$res = drupal_load('module', $module);
echo $module ." " .$res."<br />";
}
}
In theory it should show all the modules with '1' if it includes them or 0 for failure
HillsWeb.com
Hmm
This is what I got:
nodefamily 1
birthdays 1
nodeprofile 1
acl 1
activity 1
commentactivity 1
nodeactivity 1
user_relationshipsactivity 1
addthis 1
admin_menu 1
advanced_profile 1
nodeprofile_helper 1
aggregator 1
avatar_selection 1
Fatal error: Call to undefined function node_get_types() in /home/sukinisa/domains/babelup.com/public_html/includes/theme.inc on line 272
...the next module is block.module, and sure enough, I was editing a block right before the site crashed. The block I was editing had been set to refresh using block_refresh.module, which I had disabled using the database. I wanted to make sure the block wasn't still refreshing because my host told me it was. And it was; the settings added by block_refresh were still there. But the block is disabled (enabling it doesn't change anything). Deleting the block_refresh folder doesn't do anything.
I disabled block.module from the database and got this error on my site:
Fatal error: Call to undefined function block_list() in /includes/theme.inc on line 1021...because I think block.module is required in core.
Ideas?
I was editing a block right
This is quite possibly the problem-- bad code in blocks can do nasty things. It's always better to test & debug block code in a regular page before committing it to a block.
See if you can find and disable the block you were working on in the blocks table in the db.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
I'd already disabled it.
...and I'd already tested the code. When I was editing the block, I wasn't changing anything, I was just turning off a setting that apparently didn't exist any longer.
Also
I tried replacing some core files with fresh ones from d.o. (I uploaded the entire D-5.10 package with "Overwrite if source is newer" checked.) Nothing changed.
The last test actually
The last test actually produced expected result. Now let me reiterate the idea of core modules present and in good order. Most likely access rights a re incorrect there. That's why file_exists() finds them (the previous test), but include can't get them (the last test). Could you please check if node.module and the others are readable by apache (chmoded to 755 or 744)?
HillsWeb.com
That was it!
Somehow block.module was set to zero access permissions. I set it to 644 like the rest of the system files and it's now working. The first time I loaded a page I got a drupal_set_message() error about access being denied to bootstrap but it looks like everything's working now. Thanks so much! :D
(Actually I figured that out before reading this: I tried to revert to a backup from October 3, and block.module was the only file that failed to transfer. But seriously, thanks for helping me out with this.)
Thank you
I had this issue myself and your steps really helped me.
My problems were the affiliate product and workflow graph modules.
Thanks again. YOU SAVED ME!
Chris
--
Bringing value to the social web by connecting people with events, products, and services that match their interests and values
this isn't the problem
All our files have 755 access and the error still happens.
http://edtechdev.blogspot.com/
http://itls.usu.edu/
modules/modules sub-folder
It's an error from upgrading. The new modules got put in modules/modules rather than modules.
I cleaned it up and this error arose.
I had to re-create the modules/modules subfolder for the error to go away.
Now the question is how can I delete that modules/modules folder without the error coming back.
http://edtechdev.blogspot.com/
http://itls.usu.edu/