diff --git a/og_ui/og_ui.module b/og_ui/og_ui.module index 299d22d..46ecdb9 100644 --- a/og_ui/og_ui.module +++ b/og_ui/og_ui.module @@ -751,10 +751,11 @@ function og_ui_field_formatter_view($entity_type, $entity, $field, $instance, $l foreach ($items as $delta => $item) { if (!empty($accessible_ids[$item['target_id']]) && !empty($accessible_entity[$item['target_id']])) { $wrapper = entity_metadata_wrapper($group_type, $item['target_id']); + $url = entity_uri($group_type, $wrapper->value()); $element[$delta] = array( '#type' => 'link', '#title' => $wrapper->label(), - '#href' => $wrapper->url->value(), + '#href' => url($url['path'], $url['options']), // Add the group type and group ID, so it's easier for implementing // modules to extend the formatter. '#group_type' => $group_type, diff --git a/og_ui/og_ui.pages.inc b/og_ui/og_ui.pages.inc index 36d0f34..f1fd308 100644 --- a/og_ui/og_ui.pages.inc +++ b/og_ui/og_ui.pages.inc @@ -154,7 +154,11 @@ function og_ui_confirm_subscribe($form, &$form_state, $group_type, $gid, $accoun $form['gid'] = array('#type' => 'value', '#value' => $gid); $form['field_name'] = array('#type' => 'value', '#value' => $field_name); - return confirm_form($form, t('Are you sure you want to join the group %title?', array('%title' => $label)), $wrapper->url->value(), ' ', t('Join'), t('Cancel')); + $entity = entity_load_single($group_type, $gid); + $url = entity_uri($group_type, $entity); + $url = url($url['path'], $url['options']); + + return confirm_form($form, t('Are you sure you want to join the group %title?', array('%title' => $label)), $url, ' ', t('Join'), t('Cancel')); } /**