I just installed Autoload and then iContact alpha 1. After the modules list view refreshed, I noticed that several empty modules have appeared in my "Other" section. The iContact module has been installed and Drupal reported no errors in the log. Screen shot attached. After navigating away from the modules list, the admin section showed a white screen. I loaded the main page and it showed the following messages.

"
* iContact error: You are not logged in.
* iContact error: You are not logged in.
"

I'll try to debug this further on another system to see if I can reproduce it there as well.

My affected system is a CentOS release 5.4 (Final) Plesk 9 virtual server running Acquia Drupal 1.2.23 (Drupal 6.16 core). The web server is Apache/2.2.3, PHP 5.2.13 as an Apache module (mod_php5).

I managed to restore the system by uninstalling the icontact module (deleting the tables) and then deleting the module folder.

CommentFileSizeAuthor
#1 unusual_d6_modules.jpg58.89 KBwongo888

Comments

wongo888’s picture

StatusFileSize
new58.89 KB

This issue might be related to an earlier issue. The following entries have appeared in the webserver error log (not the Drupal log which goes elsewhere).

[Tue Apr 27 17:07:07 2010] [error] [client xxxxx] PHP Fatal error:  Call to a member function checkLoggedIn() on a non-object in /var/www/vhosts/xxx/httpdocs/sites/all/modules/icontact/icontact.install on line 15, referer: http://example.com/update.php?op=results
[Tue Apr 27 17:12:58 2010] [error] [client xxxxx] PHP Fatal error:  Call to a member function checkLoggedIn() on a non-object in /var/www/vhosts/xxx/httpdocs/sites/all/modules/icontact/icontact.install on line 15

I'm not sure if the screencap came through, so I'm going to repost it.

wongo888’s picture

I did a clean install of D6 on MacOSX Leopard, then I installed the Autoloader then I installed the iContact module. The exact same things happened: (1) empty module entries under "Other" prior to install, (2) after install, on viewing 'admin' the following error:

Fatal error: Call to a member function checkLoggedIn() on a non-object in /Users/kelvin/drupal6_test/sites/all/modules/icontact/icontact.install  on line 15

Clearly, after install, the following call is being made at some point in icontact.install:

icontact_requirements('runtime');

Then the following call to a function on l.249 of icontact.module returns a boolean false...on which line 16 of icontact.install tries to invoke a method. The boolean value does not have the method needed.

$icontact = icontact_load(); // $icontact is now False and not an object
...
if ($icontact->checkLoggedIn()) { // $icontact is false and has no method checkLoggedIn

I'm not sure of the rest of the logic, but that seems to be the cause of my errors. Now, consider this function (l.249, icontact.module):

function icontact_load($refresh = FALSE)

This function returns either an iContact object or FALSE, so before trying to use any functions on it (which it may not have), you need to guard it with something like:

if ($icontact){
  $icontact->do_something();
}

or perhaps:

if ($icontact && $icontact->checkLoggedIn()) {

Might be simpler, but I just put that into my module and it coughed up more errors. I'll take a look at your more recent DEV tarball next.

wongo888’s picture

I just tried the dev tarball and the empty modules issue is no longer present, but the error on viewing 'admin' remains. I believe that it is the same error on the other issue, so I will add to that thread instead.

The error with the DEV tarball was:

Fatal error: Call to a member function checkLoggedIn() on a non-object in /Users/kelvin/drupal6_test/sites/all/modules/icontact/icontact.install  on line 15
greenskin’s picture

Status: Active » Fixed

Some modules that the iContact module provided are now deprecated. Formerly each resource that the iContact service provided was made into its own module. Now the main iContact module controls these resources. Each resources .info file was commented out to keep the module from being able to run in Drupal while the code was reformed, but Drupal still considered the module available as long as it had a .info whether or not the .info actually had anything inside of it. This is what caused the blank entries to show in the /admin/build/modules page. So these modules were removed from CVS altogether, or so was thought. Some issues with CVS inadvertently left these deprecated module files in the release.

The "Fatal error: Call to a member function checkLoggedIn()" has also been fixed.

The 2.x-ALPHA2 release is now available. Please confirm this issue is fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.