I just tried to add OG to my drupal site, currently just being run locally on my computer while I build it, and I seem to be getting this weird error. Right after I activate the module in administer, it takes me to a page that says the following:

Fatal error: Call to undefined function drupal_add_css() in C:\apachefriends\xampp\...\og\og.module on line 84

I looked on line 84 and I find that it's the "else" part of a big long loop that I won't bother posting here (unless needed). Does anybody know how to fix this?

Comments

Mets’s picture

Forgot to include this. If I uncomment line 84, the site works fine again, however I get another problem. When I click on Administer -> Organic Groups, it says that a page is missing (admin/og page)! If I force Drupal to go to admin/og/og by typing it in the address bar, I get yet another error:

warning: Missing argument 2 for drupal_get_form() in C:\apachefriends\xampp\...\includes\form.inc on line 61.

dami’s picture

Looks like you installed OG 5.x version on a 4.7.x drupal.

Mets’s picture

Thanks dami, looks like the latest CVS version is 5.x

Ok, well I downloaded the 4.7.x version of OG, and that made the drupal_add_css() function error go away. However, the exact same problem I got when I uncommented that line still remains. Weird. Any ideas?

monkeythug’s picture

Did you just replace the module files without first disabling it? That's what I did and I got the same problem :-)

Just disable the module, save configuration, then enable it again. You should see the admin page has moved to admin/settings.

Cheers,

David.