Joomdle 2.x Installation

Jcohort - Can't change the mapping now

  • Lionel Ray
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #1 by Lionel Ray
Jcohort - Can't change the mapping now was created by Lionel Ray
Hi,

I download JCohort to make it easier for me to manage my group of students between their profils on Joomla and on Moodle.

The plugin works great in itself but since a few day I can't even delete or modify a cohort. An http error 500 pops every time I pick one cohort mapped and try to delete or modify.

I went into the error log and I've got those messages but I don't really know PHP and can't really understand what is going on.

The message I get from the error log is this one :

[03-Nov-2022 09:52:49 UTC] PHP Fatal error: Declaration of & JcohortsControllerMappings::getModel($name = 'mappings', $prefix = 'JcohortsMo...') must be compatible with Joomla\CMS\MVC\Controller\BaseController::getModel($name = '', $prefix = '', $config = []) in /home/******/public_html/administrator/components/com_jcohorts/controllers/mappings.php on line 22
[03-Nov-2022 09:52:51 UTC] PHP Notice: Only variables should be assigned by reference in /home/******/public_html/administrator/components/com_jcohorts/models/mappings.php on line 92
[03-Nov-2022 09:53:01 UTC] PHP Fatal error: Declaration of JcohortsModelmapping::prepareTable(&$table) must be compatible with Joomla\CMS\MVC\Model\AdminModel::prepareTable($table) in /home/******/public_html/administrator/components/com_jcohorts/models/mapping.php on line 105
[03-Nov-2022 09:53:02 UTC] PHP Notice: Only variables should be assigned by reference in /home/******/public_html/administrator/components/com_jcohorts/models/mappings.php on line 92
[03-Nov-2022 09:53:05 UTC] PHP Fatal error: Declaration of JcohortsModelmapping::prepareTable(&$table) must be compatible with Joomla\CMS\MVC\Model\AdminModel::prepareTable($table) in /home/******/public_html/administrator/components/com_jcohorts/models/mapping.php on line 105
[03-Nov-2022 09:53:06 UTC] PHP Notice: Only variables should be assigned by reference in /home/******/public_html/administrator/components/com_jcohorts/models/mappings.php on line 92


Thanks in advance for your time !

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Jcohort - Can't change the mapping now
Thanks for the bug report. I guess you are having this problem now because you recently switched to a newer PHP version?

I have now uploaded a new package, compatible with PHP8. Please test and let me know if you find any issues.

Please Log in or Create an account to join the conversation.

  • Lionel Ray
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #3 by Lionel Ray
Replied by Lionel Ray on topic Jcohort - Can't change the mapping now
Hi Antonio,

It is exactly what happened, and you did fix it with the new package.

Thanks for your quick answer !

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic Jcohort - Can't change the mapping now
Great, thanks for the feedback.

Please Log in or Create an account to join the conversation.

  • Lionel Ray
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #5 by Lionel Ray
Replied by Lionel Ray on topic Jcohort - Can't change the mapping now
Hi Antonio,

Apparently the problem came back when I wanted to sync the cohort. The error log give me this as the problem (which looks like the same) :


[15-Nov-2022 08:48:58 UTC] PHP Fatal error: Declaration of & JcohortsControllerMappings::getModel($name = 'mappings', $prefix = 'JcohortsMo...') must be compatible with Joomla\CMS\MVC\Controller\BaseController::getModel($name = '', $prefix = '', $config = []) in /home/******/public_html/administrator/components/com_jcohorts/controllers/mappings.php on line 22

I check the version of my component and it is 1.4.0, I delete it and I try to install the latest package by transfert and repository but It won't go to 1.4.1,.

The plugin is fine btw, it installed itself and upgrade to 1.4.1

I did try it on two differents servers and website.

Thanks in advance for you answer.

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #6 by Antonio Durán
Replied by Antonio Durán on topic Jcohort - Can't change the mapping now
Thanks for the bug report. I have now uploaded a new version to fix the problem. Please test and let me know how it goes.

Please Log in or Create an account to join the conversation.

  • Lionel Ray
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #7 by Lionel Ray
Replied by Lionel Ray on topic Jcohort - Can't change the mapping now
Hi Antonio,

The connexion between Moodle and Joomla on cohort is now working.

Just to let you know also that on the left side on jcohort when you try to select all the cohort by ticking the box next to ID, it doesn't select anything. (Not really a problem if you don't have to many cohort but I wanted to inform you)

Thanks for your quick answer,

Have a good one !

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #8 by Antonio Durán
Replied by Antonio Durán on topic Jcohort - Can't change the mapping now
Thanks for the feedback. Sorry for the delay.

Also thank you for the note about the "select all". I have fixed it so it is included for the next release. As you say, it is not a big issue, so I don't think it is worth to release a new version for just that.

Please Log in or Create an account to join the conversation.