Joomdle 2.x Installation

CBSubs Joomdle plugin issue

  • Dimitris
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 11 months ago #1 by Dimitris
CBSubs Joomdle plugin issue was created by Dimitris
The plugin installs without issues but when I try to open
Components->Community Builder->Plugin Management->Paid Subscriptions->Plans->MyXplan it produces
Code:
An error has occurred. 0 Call to undefined function create_function()
Unpublishing the plugin doesn't resolve the issue.
Uninstalling it, all work fine

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

More
2 years 11 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic CBSubs Joomdle plugin issue
Hi.

It seems that create_function is no longer available in PHP8, so I will need to review the plugin and find a way to make it work without it.

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

  • Dimitris
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 11 months ago #3 by Dimitris
Replied by Dimitris on topic CBSubs Joomdle plugin issue
Thank you Antonio,

Looking forward

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

More
2 years 10 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic CBSubs Joomdle plugin issue
Hi.

Can you share your CBSubs package so I can test with it? You can send it to antonio at joomdle email.

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

More
2 years 10 months ago #5 by Antonio Durán
Replied by Antonio Durán on topic CBSubs Joomdle plugin issue
Hi.

If you want you can try a change to see if it works as expected.
File: components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/plugin/cbsubsjoomdleecms/cbsubs.joomdleecms.php
Change line (~200):
Code:
$valAsObj = array_map( create_function( '$v', '$o=new stdClass(); $o->value=$v; return $o;' ), explode( '|*|', $value ) );
By:
Code:
$newfunc = function ($v) { $o=new stdClass(); $o->value=$v; return $o; }; $valAsObj = array_map( $newfunc, explode( '|*|', $value ) );

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

  • Dimitris
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 10 months ago #6 by Dimitris
Replied by Dimitris on topic CBSubs Joomdle plugin issue
Ok, a few comments

COMMENT 1

Can you share your CBSubs package so I can test with it? You can send it to antonio at joomdle email.

I had downloaded it a couple of months ago. I will try to find the zip file as I haven't updated my subscription since February. It was receiving updates within the administrator. I will check and send it to you.
Here is my version of CBSubs


COMMENT 2
Code:
...File: components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/plugin/cbsubsjoomdleecms/cbsubs.joomdleecms.php
What I can find is components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/plugin/cbsubsjoomdle/cbsubs.joomdle.php
So no "ecms"

COMMENT 3

Change line (~200):

Code:
$valAsObj = array_map( create_function( '$v', '$o=new stdClass(); $o->value=$v; return $o;' ), explode( '|*|', $value ) );

I found this code within cbsubs.joomdle.php but in line 103 and changed it accordingly.

RESULT
Now I can view the CBSubs Plans from admnistrator but I receive the following

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

  • Dimitris
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 10 months ago #7 by Dimitris
Replied by Dimitris on topic CBSubs Joomdle plugin issue
Here is the result after checking a bit more...

Once a user subscribes to a CBSubs plan, he is automatically enrolled to the specified course.
So far so good.
Now, once he completes the course successfully, no record is added in moodle's `#___course_completions` table, while when an Administrator enrolls a user manually to the course and the user completes the (same) course successfully, the record is added normally to the table.
I am not sure if this is directly related to the plugin or it happens for some other reason...

I will try to verify it once more tomorrow in order to be 100% sure

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

More
2 years 10 months ago #8 by Antonio Durán
Replied by Antonio Durán on topic CBSubs Joomdle plugin issue
> Now I can view the CBSubs Plans from admnistrator but I receive the following

Yes, that's normal: CB will show the warning for any plugin that does not have the same version as CB, but it is harmless.

> Now, once he completes the course successfully, no record is added in moodle's `#___course_completions` table, while when an Administrator enrolls a user manually to the course and the user completes the (same) course successfully, the record is added normally to the table.

I don't think this can be related, as I have worked on many sites with Joomdle enrolments and course completion working fine, but please do more testing and let me know, something may have changed....

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

  • Dimitris
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 10 months ago - 2 years 10 months ago #9 by Dimitris
Replied by Dimitris on topic CBSubs Joomdle plugin issue

Yes, that's normal: CB will show the warning for any plugin that does not have the same version as CB, but it is harmless.

No problem.

I don't think this can be related, as I have worked on many sites with Joomdle enrolments and course completion working fine, but please do more testing and let me know, something may have changed....

And of course you are correct! For some reason that I can't recall right now, I had unchecked all Course administration->Course completion->Condition: Activity completion checkboxes. Checked back all and records in db appeared!

Thank you, case closed!
Last edit: 2 years 10 months ago by Dimitris .

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