- Posts: 4
Kunena and Joomdle Integration Issue
- Omo
- Topic Author
- Offline
- New Member
-
Less
More
12 years 6 months ago #1
by Omo
Kunena and Joomdle Integration Issue was created by Omo
I am using Joomla 2.5.14, Kunena 3.0.2 and Joomdle RC0.9. I have followed the instruction in the wiki to enable Kunena forum in place of default Moodle forum. However, no course forum category is showing in my kunena board.I do see the two courses listed under Joomdle forum page in admin but these are not displaying in Kunena. When I click on sync Moodle Forum to Kunena, I get a blank screen.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
12 years 6 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Kunena and Joomdle Integration Issue
For the forums to appear in Kunena, you need to create them in Moodle (having all the required otions set).
A blank screen is usually a fatal php error. You can check your logs to try to get more info.
A blank screen is usually a fatal php error. You can check your logs to try to get more info.
Please Log in or Create an account to join the conversation.
- Omo
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
12 years 6 months ago #3
by Omo
Replied by Omo on topic Kunena and Joomdle Integration Issue
I have checked the server log and there is no indication of the error. Any other insight please? Thanks
Antonio Durán wrote: For the forums to appear in Kunena, you need to create them in Moodle (having all the required otions set).
A blank screen is usually a fatal php error. You can check your logs to try to get more info.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
12 years 6 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Kunena and Joomdle Integration Issue
Many sites won't show full logs in panel, but if there is a blank page, there is an error.
You can try checking them by ssh.
You can try checking them by ssh.
Please Log in or Create an account to join the conversation.
- Omo
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
12 years 6 months ago #5
by Omo
Replied by Omo on topic Kunena and Joomdle Integration Issue
I had my host enable ssh but that also did not show any detail about the error, so it does not appear to be an apache error, though I stand corrected.. We then turned on Joomla debug mode and here is the error shown when I tried again to sync Joomla moodle to Kunena.
Note - I have substituted the paths to my server for security reasons on the forum. I can PM you specific details if you want. Thanks for your help.
Note - I have substituted the paths to my server for security reasons on the forum. I can PM you specific details if you want. Thanks for your help.
Code:
500 - An error has occurred.
JDatabaseMySQL::query: 1062 - Duplicate entry '649-30' for key 'PRIMARY' SQL=INSERT INTO `tablename_user_usergroup_map` (`user_id`,`group_id`) VALUES ('649','30')
Return to Control Panel
Call stack
#
Function
Location
1
JAdministrator->dispatch()
/server_path/administrator/index.php:46
2
JComponentHelper::renderComponent()
/server_path/administrator/includes/application.php:153
3
JComponentHelper::executeComponent()
/server_path/libraries/joomla/application/component/helper.php:351
4
require_once()
/server_path/libraries/joomla/application/component/helper.php:383
5
JController->execute()
/server_path/administrator/components/com_joomdle/joomdle.php:44
6
JoomdleController->sync_to_kunena()
/server_path/libraries/joomla/application/component/controller.php:761
7
JoomdleHelperForum->sync_forums()
/server_path/administrator/components/com_joomdle/controller.php:690
8
JoomdleHelperForum->sync_course_forums()
/server_path/administrator/components/com_joomdle/helpers/forum.php:440
9
JoomdleHelperJoomlagroups->sync_group_members()
/server_path/administrator/components/com_joomdle/helpers/forum.php:450
10
JoomdleHelperJoomlagroups->add_group_member()
/server_path/administrator/components/com_joomdle/helpers/joomlagroups.php:190
11
JDatabase->insertObject()
/server_path/administrator/components/com_joomdle/helpers/joomlagroups.php:131
12
JDatabaseMySQL->execute()
/server_path/libraries/joomla/database/database.php:841
13
JError::raiseError()
/server_path/libraries/joomla/database/database/mysql.php:548
14
JError::raise()
/server_path/libraries/joomla/error/error.php:251
Please Log in or Create an account to join the conversation.
- Omo
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
12 years 6 months ago #6
by Omo
Replied by Omo on topic Kunena and Joomdle Integration Issue
Any help on this will be highly appreciated...thanks
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7902
12 years 6 months ago #7
by Antonio Durán
Replied by Antonio Durán on topic Kunena and Joomdle Integration Issue
Hi. This is a bug in current versions.
You can fix it by replacing the add_group_member function in administrator/components/com_joomdle/helpers/joomlagroups.php with this one:
You can fix it by replacing the add_group_member function in administrator/components/com_joomdle/helpers/joomlagroups.php with this one:
Code:
function add_group_member ($course_id, $username, $type)
{
$db = JFactory::getDBO ();
$user_id = JUserHelper::getUserId ($username);
if (!$user_id)
return;
// Add to general group if needed
$parent_id = JoomdleHelperJoomlagroups::get_parent_id ($type);
$query = 'SELECT * ' .
' FROM #__user_usergroup_map' .
" WHERE group_id = " . $db->Quote($parent_id) .
" AND user_id = " . $db->Quote($user_id);
$db->setQuery($query);
$map = $db->loadAssocList();
if (!count ($map))
{
$data->user_id = $user_id;
$data->group_id = $parent_id;
$db->insertObject( '#__user_usergroup_map', $data);
}
// Add to course group
$group_id = JoomdleHelperJoomlagroups::get_course_group_id ($course_id, $type);
if (!$group_id)
return;
$query = 'SELECT * ' .
' FROM #__user_usergroup_map' .
" WHERE group_id = " . $db->Quote($group_id) .
" AND user_id = " . $db->Quote($user_id);
$db->setQuery($query);
$map = $db->loadAssocList();
if (!count ($map))
{
$data->user_id = $user_id;
$data->group_id = $group_id;
$db->insertObject( '#__user_usergroup_map', $data);
}
}
Please Log in or Create an account to join the conversation.