Default user role and some issues with "invite new instructor" feature

Hi all,
Should I leave the default user role as "subscriber"?

The main issue (I'm still testing the plugin):
I made a test invite new instructor. The instructor received the invite by email. SInce he didn't have an account, he had to create one. Once done, he was sent to an invalid url (actually, the correct url - but with wrong characters -

To accept the invite, the test user had to use the links sent by email. Appart from the "Invitation activated." message, the test user also got an error:

Warning: Invalid argument supplied for foreach() in /home/myserver/public_html/host/ on line 4564

At least he got the right message
Invitation activated.
Congratulations. You are now an instructor in the following course:
Aenean auctor nec magna sed mattis

The course title is a link to:

When clicking on the link, the test user gets an blank page - is that because his user is (also) a subscriber?

Hope someone can help me.
Thank you.


  • Adam Czajczyk

    Hello Marius,

    I hope you're well today and thank you for your question!

    I've tested this on my setup by following all the steps you described and was able to replicate the issue, except the "Warning: Invalid argument..." notice. I think this one isn't actually a bug and most likely there's WordPress debugging enabled on your site.

    That said, would you please make sure that there's no following line in your "wp-config.php" file?


    If it's there, please remove it completely or replace "true" with "false" and this should get rid of the message (which is not actually affecting plugin's performance).

    As for the blank page. It seems like an URL is wrongly encoded, hence those "%20" strings included. Once you remove them manually the link starts to work. I've tested this on a clean WP install with only CoursePress and default Twenty Fifteen theme enabled so I consider this a bug and I'm reporting this to the developer.

    I hope the developer will be able to provide us here with a "quick fix" or "work around" for this but please note that instead it may be included with the nearest plugin release. That said, please keep an eye on this thread for further information and it would be great if you could keep plugin updated "on the fly".

    Kind regards,

  • Mario

    Just realised I still don't know if the instructor should have the default role on the website.
    Should the "students" be subscribers?

    If the instructor is a subscriber as well, he/she won't be able to add units to his/her course, right? Should there be instructors which are only subscribers - and if one of the instructors needs to add his own units should have a different role, as author or editor?

    Thank you.

  • Adam Czajczyk

    Hello Mario!

    Just realised I still don't know if the instructor should have the default role on the website.
    Should the "students" be subscribers?

    Seems that I just went for a "mental shortcut" here, I'm sorry for this :slight_smile: I should have mention of course that "instructor" in terms of CoursePress capabilities doesn't relay actually on WP user-role so whether it would be a "subscriber", an "autor" or an "admin" - this should all work pretty much the same except that "instructor" should be able to access his/her own courses (those he/she is assigned to) only, unless he's also given WP user-role of "admin".

    I hope that helps!

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.