JS callback doesn't register the default language. Therefore entityinfo doesn't get the right cache object.
Please set the default language.

Comments

michielnugter’s picture

Status: Active » Fixed

The issue is fixed in the latest dev, thanks for reporting it!

svouthi’s picture

Hello,

I just installed the beta2 version, and then the dev after I experienced the same (I think) problem on my site. However, installing the dev version doesn't appear to have solved the issue. My SHS exposed filters still disappear from my pages after I add the rewrite rules to my htaccess file. Is this perhaps related to issue #356009? http://drupal.org/node/356009

I'm excited to see this module, if I could only use it!

michielnugter’s picture

I can't place the bug you're talking about. I haven't experienced this bug yet, can you please explain it in more detail? Are the filters gone on initial load or later after having filtered the view?

Maybe a separate issue with a detailed description is the best instead of `hijacking` this issue.

svouthi’s picture

As I said, I thought this may pertain to the same issue. As it does not, I will certainly start another and give more detail as you have requested. Thank you for your response.

Status: Fixed » Closed (fixed)

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

RobKoberg’s picture

(just starting with this module, and so far think it is great!)
I have to bootstrap to DRUPAL_BOOTSTRAP_LANGUAGE to get this to work. And I can use entityreference and taxonomy references, including entity_metadata_wrapper. I was wondering if there was a way to boostrap lower, but with more includes and/or dependencies. Here is a relevant item from my hook_js:

'user_profile' => array(
  'callback' => 'rfmsuk_user_profile',
  'includes' => array('form', 'menu', 'lock', 'path', 'entity', 'errors'),
  'dependencies' => array('user', 'ctools', 'devel', 'field', 'entity', 'entityreference', 'flag', 'profile2', 'og', 'taxonomy', 'filter'),
  'file'         => 'user.page.inc',
  'bootstrap'    => DRUPAL_BOOTSTRAP_LANGUAGE,
  'access callback'  => 'user_is_logged_in'
),

Here is the callback:


function rfmsuk_user_profile() {
  global $user;
  $user_filter_props = array('access', 'created', 'data', 'field_new_local_authority', 'field_new_postal_code', 'field_new_school_institution', 'init', 'language', 'login', 'og_user_node', 'pass', 'picture', 'roles', 'signature', 'signature_format', 'theme');
  $profile_filter_props = array('label', 'type', 'uid', 'created', 'changed');


  $user = user_load($user->uid);
  $user_wrapper = entity_metadata_wrapper('user', $user);
//dpm($user, '$user');

  $account = clone $user;

  $profiles = profile2_load_by_user($user);

  foreach($profiles as $type=>$profile) {
    foreach($profile_filter_props as $prop) {
      unset($profile->{$prop});
    }
  }

  $account->profile = $profiles;

  $account->field_school = $user_wrapper->field_school->value();
  //$account->field_school = (array) taxonomy_term_load($user->field_school[LANGUAGE_NONE][0]['tid']);//$user_wrapper->field_school->value();

  $group_nid = $user->og_user_node[LANGUAGE_NONE][0]['target_id'];
  $group_title = db_query('select title from {node} where nid=:nid', array(':nid' => $group_nid))->fetchField();
  $account->group_brief = array('title' => $group_title, 'nid' => $group_nid);

  foreach($user_filter_props as $prop) {
    unset($account->{$prop});
  }

  return $account;
}