diff --git a/components/com_contact/models/contact.php b/components/com_contact/models/contact.php index 6edc1d77c6d12..e3f24725f48cd 100644 --- a/components/com_contact/models/contact.php +++ b/components/com_contact/models/contact.php @@ -386,7 +386,14 @@ protected function buildContactExtendedData($contact) $data = $userModel->getItem((int) $contact->user_id); JPluginHelper::importPlugin('user'); - $form = new JForm('com_users.profile'); + + // Get the form. + JForm::addFormPath(JPATH_SITE . '/components/com_users/models/forms'); + JForm::addFieldPath(JPATH_SITE . '/components/com_users/models/fields'); + JForm::addFormPath(JPATH_SITE . '/components/com_users/model/form'); + JForm::addFieldPath(JPATH_SITE . '/components/com_users/model/field'); + + $form = JForm::getInstance('com_users.profile', 'profile'); // Get the dispatcher. $dispatcher = JEventDispatcher::getInstance();