Warning php messages when setting instructor permission

Hello!
I'm receiving some alerts when I try to modify instructor permissions from CoursePress Pro>Settings, like this one:

Warning: Invalid argument supplied for foreach() in /web/htdocs/www.******.it/home/wp-content/plugins/coursepress/includes/admin-pages/settings-instructor-capabilities.php on line 25
Same messages with the difference at the end of the string... on line 30, on line 29, etc.

(Sorry for censored marks on the Domain name. Obviously I have read and made all the tips you suggest in "before you post".)

Thank you
David

  • Michael Bissett

    Hey @David, welcome to the WPMU DEV Community, hope you're doing well this evening! :slight_smile:

    Would you happen to have WP_DEBUG set to "true" (without quotes) inside your wp-config.php? If so, could you try setting it to "false" (without quotes) please, and seeing if this message shows up?

    I'm not seeing this message show up on my test site, even after trying various combinations of Instructors settings, have you also checked to see if another plugin might be causing this? We've got a handy troubleshooting flowchart that you can follow here:

    https://premium.wpmudev.org/manuals/getting-support/

    Another thing that you could try would be disabling & re-enabling CoursePress Pro, just to see if that clears anything out here. :slight_smile:

    Let me know if I can be of further assistance please!

    Kind Regards,
    Michael

  • David

    Hello Michael
    Thank you for quick response.
    I have already done all the suggested procedures.
    I am sorry but also I am not authorized to grant you a temporary support access to the site because my client is a public institution that wants the website must remains hidden to anyone until its pubblication. Times are also really tight to make additional tests.

    Thanks a lot.
    David P.B.

  • Timothy Bowers

    Hey there David,

    In posting this question through the Dashboard, or selecting the site through the Q&A form we're able to see the domain and can already.

    Without direct access it could make debugging a much longer process.

    I've also tested this, from my site it all looks fine and I get no errors. I also had WP_DEBUG enabled.

    Can you please provide screenshots of the settings pages, and the especially the capabilities page for instructors? And the same for the lightbox?

    We'll then try and replicate the set up to see if that helps.

    Take care.

  • David

    Hello!
    Despite recent plugin upgrades , php warning messages are still there, but at this point they seems not interfere at all. Even using CoursePress Pro theme.
    Without open a new thread, let me submit another bug. In Courses list, from the dashboard, I cannot un-publish a course. The switch icon remains green and published. Also using menu with bulk actions, nothing.
    Thanks
    David

  • Adam Czajczyk

    Hello David,

    Hope you're well and I'm sorry for the delay!

    From what you're saying I understand that those php warnings messages are no longer an issue? Just as a side note: warnings often doesn't cause problems as they may be a result of a too strict php configuration or other "soft incompatibilities" that sometimes occur. Anyway, if everything runs well you may want to disable WordPress debug mode by setting "WP_DEBUG" flag in wp-config.php back to "false".

    If it comes to your new question, I've tested it on my test install and couldn't reproduce such behaviour. That being said, could you please open a new thread regarding this issue? It would help us better track the topic and work-out the solution faster.

    Cheers,
    Adam