- Posts: 30
Joomdle 1.0 Installation
Forum links not working after upgrade
- David Laverick
- Topic Author
- Offline
- Junior Member
-
Less
More
9 years 8 months ago #1
by David Laverick
Forum links not working after upgrade was created by David Laverick
Hi Guys,
Recently migrated our VLE site to a new server running PHP7, upgrading everything on the way (BIG job!!!). Everything seems to be working now except the Kunena links in the Moodle topics don't work. I just get a blank page where the forum should be displayed, all the modules around the content are still showing, so the page doesn't seem to be broken, nothing of interest in the error log and the access log shows a 200 status for the call. The forums work if you use the Joomla menu links to go straight to the forums and the jos_joomdle_course_forums database table still has the correct entries, so I'm at a loss to see why it isn't displaying.
Any help or advice on where to start looking would be great.
Thanks
Dave
Joomdle 1.0.6
Joomla 3.6.0
Moodle 3.0.5+ (Build: 20160721)
Kunena 4.0.11
PHP Version 7.0.9
Recently migrated our VLE site to a new server running PHP7, upgrading everything on the way (BIG job!!!). Everything seems to be working now except the Kunena links in the Moodle topics don't work. I just get a blank page where the forum should be displayed, all the modules around the content are still showing, so the page doesn't seem to be broken, nothing of interest in the error log and the access log shows a 200 status for the call. The forums work if you use the Joomla menu links to go straight to the forums and the jos_joomdle_course_forums database table still has the correct entries, so I'm at a loss to see why it isn't displaying.
Any help or advice on where to start looking would be great.
Thanks
Dave
Joomdle 1.0.6
Joomla 3.6.0
Moodle 3.0.5+ (Build: 20160721)
Kunena 4.0.11
PHP Version 7.0.9
Please Log in or Create an account to join the conversation.
- David Laverick
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 30
9 years 8 months ago #2
by David Laverick
Replied by David Laverick on topic Forum links not working after upgrade
Update......
I have been doing some further digging and found that it seems to be related to the URL translation in some way.
The url code in system.php says:
$link = JRoute::_("index.php?option=com_kunena&func=showcat&catid=$forum_id&course_id=$course_id&Itemid=$itemid");
Which, in my example would be translate to:
/index.php?option=com_kunena&func=showcat&catid=314&course_id=85&Itemid=418
Due to Search Engine friendly URLs, the actual URL in the moodle topic link becomes:
/component/kunena/catid-314?func=showcat&course_id=85&Itemid=418
If I paste the first URL into my browser it displays the forum correctly as expected. If I paste in the 2nd URL, (which is how the links are formed) it doesn't.
Other pages on the site are working correctly, so not sure if this issue relates to Joomdle, Joomla or Kunena
Best wishes
Dave
Joomdle 1.0.6
Joomla 3.6.0
Moodle 3.0.5+ (Build: 20160721)
Kunena 4.0.11
PHP Version 7.0.9
I have been doing some further digging and found that it seems to be related to the URL translation in some way.
The url code in system.php says:
$link = JRoute::_("index.php?option=com_kunena&func=showcat&catid=$forum_id&course_id=$course_id&Itemid=$itemid");
Which, in my example would be translate to:
/index.php?option=com_kunena&func=showcat&catid=314&course_id=85&Itemid=418
Due to Search Engine friendly URLs, the actual URL in the moodle topic link becomes:
/component/kunena/catid-314?func=showcat&course_id=85&Itemid=418
If I paste the first URL into my browser it displays the forum correctly as expected. If I paste in the 2nd URL, (which is how the links are formed) it doesn't.
Other pages on the site are working correctly, so not sure if this issue relates to Joomdle, Joomla or Kunena
Best wishes
Dave
Joomdle 1.0.6
Joomla 3.6.0
Moodle 3.0.5+ (Build: 20160721)
Kunena 4.0.11
PHP Version 7.0.9
Please Log in or Create an account to join the conversation.
- David Laverick
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 30
9 years 8 months ago #3
by David Laverick
Replied by David Laverick on topic Forum links not working after upgrade
Ok I have made a temporary fix that has got the links working again. In administrator/components/com_joomdle/helpers/system.php on line 348 I replaced
$link = JRoute::_("index.php?option=com_kunena&func=showcat&catid=$forum_id&course_id=$course_id&Itemid=$itemid");
With
$link = JURI::base() . "index.php?option=com_kunena&func=showcat&catid=$forum_id&course_id=$course_id&Itemid=$itemid";
I should probably do the same on line 346, but I'm not sure what the significance of $sub_version is. My links appear to have a sub_version of 1.
Any advise on this, and a permanent solution would be great but the pressure is off for now.
Thanks
Dave
Joomdle 1.0.6
Joomla 3.6.0
Moodle 3.0.5+ (Build: 20160721)
Kunena 4.0.11
PHP Version 7.0.9
$link = JRoute::_("index.php?option=com_kunena&func=showcat&catid=$forum_id&course_id=$course_id&Itemid=$itemid");
With
$link = JURI::base() . "index.php?option=com_kunena&func=showcat&catid=$forum_id&course_id=$course_id&Itemid=$itemid";
I should probably do the same on line 346, but I'm not sure what the significance of $sub_version is. My links appear to have a sub_version of 1.
Any advise on this, and a permanent solution would be great but the pressure is off for now.
Thanks
Dave
Joomdle 1.0.6
Joomla 3.6.0
Moodle 3.0.5+ (Build: 20160721)
Kunena 4.0.11
PHP Version 7.0.9
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
9 years 8 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Forum links not working after upgrade
Hi David. Thanks for the info. I tried to replicate the problem in my local installation, but could not make it happen: it works fine for me with the original code. Then I noticed I was running Kunena 3.x
I have now installed Kunena 4.x and can see the problem.
I think you can fix it by changing link to:
We will include code in next release to use this link when using Kunena v4.
I have now installed Kunena 4.x and can see the problem.
I think you can fix it by changing link to:
Code:
$link = JRoute::_("index.php?option=com_kunena&view=category&catid=$forum_id&course_id=$course_id&Itemid=$itemid");
We will include code in next release to use this link when using Kunena v4.
Please Log in or Create an account to join the conversation.