Hi everyone,

Each time i try to enable a new module i have this error screen error: http://www.webpagescreenshot.info/img/792305-78201134302pm.png and watchdog registers this error in same time:
Notice: Undefined property: stdClass::$mode in _ctools_export_unpack_object() (line 775 of /var/www/drupal/sites/all/modules/ctools/includes/export.inc).

i've no idea where to start tracking down the error from or whats the involvement of ctools in this

thanks

Comments

cartagena’s picture

Hi--I updated to the Jul 12 dev version of ctools yesterday and got the same error. I went back to the previous version and still had it although it wasn't there before I updated. I did clear all the caches several times. I would be most happy to provide any information that would help resolve this.

It shows up on the system Node template in panels as well as the custom templates I have built. Thanks.

merlinofchaos’s picture

This might mean that a module updated its schema, but somehow the database isn't in sync with it. Be sure to hit update.php and clear caches? DOes that change anything?

cartagena’s picture

I had run update.php but I went ahead and redid it. It said no pending updates. I cleared the cache a couple more times and now the error is gone. I guess I need to be a bit more patient before posting...thanks so much!

merlinofchaos’s picture

Status:Active» Fixed

It is frustrating to me that the way caches get built, it can take multiple cache clears. I haven't been able to put myself into a situation where this is still needed, but many reports from the field indicate that it still is.

Ciprian Oancia’s picture

In my case it happents also whenever i clear all caches(after), when im enabling a module, or sometimes it happent even when having batch of update.php

While site has no other errors i am offering anytime a debug account on this .dev website. my irc nickname is chipnt

thanks

adelayde’s picture

I was getting the same issue, but reporting for $options. It seems that in the loop in export.inc around line 775:

  foreach ($schema['fields'] as $field => $info) {
      $object->$field = empty($info['serialize']) ? $data->$field : unserialize($data->$field);
  }

That it's possible for the value of '$data->$field' to not be set, which yields an error: In this case, the field 'options' were not actually set.

I'm not sure if this is a correct solution, but it works as a hack, simply to check for the the field being set prior to the offending line 775 being executed. My adjusted code for export.inc now reads:

  foreach ($schema['fields'] as $field => $info) {
    if (isset($data->$field)) {
      $object->$field = empty($info['serialize']) ? $data->$field : unserialize($data->$field);
    }  
  }

Perhaps that's a bit too much of a shortcut hack, and means I've just stuck a plaster over some bigger problem that I don't understand....?

merlinofchaos’s picture

That hack fixes the notice, but it does not fix the schema/actual database being out of sync issue.

Ciprian Oancia’s picture

What should i do then to fix the sync between schema and actual db, is there any script wich could check for non synced modules?

animelion’s picture

Active discussion on the issue happening over here #1209576: problems with ctools on update.php and login pages

americkson’s picture

When you are clearing your cache are you using Drush or are you using the Drupal admin>configuration>performance interface? I have been clearing cache like a mad man with both and I'm not getting the error to clear.

Status:Fixed» Closed (fixed)

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