problem after update CoursePress Pro

Good morning,
this morning after update CoursePress Pro I have found this on my site...

Warning: array_filter() expects parameter 1 to be array, boolean given in /home/dolcesen/public_html/corsidicucinanaturale/wp-content/plugins/coursepress/2.0/include/coursepress/data/class-student.php on line 2004

Someone can help me ?

thank you in advance

  • Denitsa

    Hello imoscucci,
    I hope you're doing good and thanks for reaching us!

    I would suggest first switching to logging debug on your server instead of showing it on site directly.
    You can do this by replacing define('WP_DEBUG', false); in the wp-config.php via FTP with this code:

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set( 'display_errors', 0 );

    This will create a log with the errors, instead of showing them on your site. The log will be saved to a debug.log file inside the "/wp-content" folder.

    Can you give me some info regarding your server specs, like PHP version, memory limits, max_execution_time?

    There could also be some plugin conflicting here, so could you please make a basic theme/plugin conflict test? To perform it, please follow all the steps described on a flowchart in this article (you may need to scroll the page down a little):
    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Keep us posted on the results!

    Regards,
    Denitsa

    • imoscucci

      Hi thank you in advance for your help.
      I replace the line in wp-config.php and the error has disappeared.
      For other details I can tell you this
      Apache Version 2.2.24
      PHP Version 5.3.26
      MySQL Version 5.5.31-30.3-log
      Architecture x86_64
      Operating System linux

      For plugin conflict I haven't tried to disable other plugin.

      Debug.log give me this result :
      "[08-Mar-2017 20:16:48 UTC] PHP Notice: map_meta_cap è stato richiamato in maniera scorretta. Il tipo di contenuto (post type) coursepress_student_login non è registrato, quindi non è affidabile verificare la capacità "edit_post" con questo tipo di contenuto. Leggi Debugging in WordPress per maggiori informazioni. (Questo messaggio è stato aggiunto nella versione 4.4.0.) in /home/dolcesen/public_html/corsidicucinanaturale/wp-includes/functions.php on line 4137
      [08-Mar-2017 20:17:36 UTC] PHP Notice: map_meta_cap è stato richiamato in maniera scorretta. Il tipo di contenuto (post type) course_archive non è registrato, quindi non è affidabile verificare la capacità "edit_post" con questo tipo di contenuto. Leggi Debugging in WordPress per maggiori informazioni. (Questo messaggio è stato aggiunto nella versione 4.4.0.) in /home/dolcesen/public_html/corsidicucinanaturale/wp-includes/functions.php on line 4137
      [08-Mar-2017 20:17:42 UTC] PHP Warning: array_filter() expects parameter 1 to be array, boolean given in /home/dolcesen/public_html/corsidicucinanaturale/wp-content/plugins/coursepress/2.0/include/coursepress/data/class-student.php on line 2004"

      I have found another thing.......I have this problem only if I'm not logged i, when I'm logged in I have any problem.

  • Sajid

    Hello everyone,
    Hope you all doing good today :slight_smile:

    I am really sorry for inconvenience that may caused by this. We could replicate this issue and it is already reported to developer.

    I am sorry but we are unable to provide an ETA of when this bug will be fixed and released at the moment. As soon as there will be an update, we will post a reply here. Please keep an eye on this thread for further updates.

    Take care and have a nice day ahead :slight_smile:

    Best Regards,
    Sajid - WPMU DEV Support

  • Denitsa

    Hello Bela,
    I am very sorry about the troubles this may have caused! There is a patch ready and we will see this issue fixed in the next plugin update.

    I strongly suggest making a backup of your site before you begin the following steps!

    Go to Plugins -> Installed Plugins, locate the CoursePress, Deactivate and then Delete it. If you want to be on the safe side here, login to your site via FTP, go to the wp-content/plugins folder and
    rename the /coursepress folder to something else (like /coursepress-delete). After you're done with installing the older version, you can come back here and delete that renamed folder.

    Until the next release is out, you can install the previous version of the plugin by going to the plugin's page, hitting Changelog and scrolling down to choose an older one.

    Then you hit the Download button and manually install and activate the downloaded plugin ia the WordPress Dashboard -> Plugins -> Add new -> Upload plugin button.

    I hope this helps and thank you for your patience!

    Best regards,
    Denitsa