diff --git a/www/profiles/openatrium/modules/contrib/pathauto/pathauto.module b/www/profiles/openatrium/modules/contrib/pathauto/pathauto.module index 0baf1e0..5c0d8d2 100644 --- a/www/profiles/openatrium/modules/contrib/pathauto/pathauto.module +++ b/www/profiles/openatrium/modules/contrib/pathauto/pathauto.module @@ -297,10 +297,20 @@ function pathauto_field_attach_form($entity_type, $entity, &$form, &$form_state, $uri = entity_uri($entity_type, $entity); $path = drupal_get_path_alias($uri['path'], $langcode); $pathauto_alias = pathauto_create_alias($entity_type, 'return', $uri['path'], array($entity_type => $entity), $bundle, $langcode); - $entity->path['pathauto'] = ($path != $uri['path'] && $path == $pathauto_alias); + if(isset($entity->path)) { + $entity->path = array( + $entity->path, + 'pathauto' => ($path != $uri['path'] && $path == $pathauto_alias), + ); + } + else { + $entity->path = array( + 'pathauto' => ($path != $uri['path'] && $path == $pathauto_alias), + ); + } } else { - $entity->path['pathauto'] = TRUE; + $entity->path = array('pathauto' => TRUE); } } @@ -348,7 +358,9 @@ function pathauto_entity_load($entities, $type) { $states = pathauto_entity_state_load_multiple($type, array_keys($entities)); foreach ($states as $id => $state) { if (!isset($entities[$id]->path['pathauto'])) { - $entities[$id]->path['pathauto'] = $state; + if (isset($entities[$id]->path) && !gettype($entities[$id]->path) == 'string') { + $entities[$id]->path['pathauto'] = $state; + } } } }