Can not load CoursePress Pro Report - 503 error

I am having issues loading student reports in Coursepress Pro. A 503, service unavailable error occurs once I try to load the PDF report.

:disappointed:

  • Rupok

    Hi Amanda, hope you had a wonderful day.

    I tried to regenerate the issue on my test site but I could not. PDF reports are working absolutely fine in my sites.

    So this is your site specific issue. Can you do a quick plugin conflict test just to make sure no other plugin is conflicting and causing this? To know more about plugin conflict test, you can check this article: http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Can you also turn on debug mode in WordPress? To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

    define('WP_DEBUG', true);

    In order to enable the error logging to a file on the server you need to add yet one more similar line:

    define( 'WP_DEBUG_LOG', true );

    In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

    Depending on whether you want your errors to be only logged or also displayed on the screen you should also have this line there, immediately after the line mentioned above:

    define( 'WP_DEBUG_DISPLAY', false );

    The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

    Past errors here. If file is very long, paste them to a text file and attach with your reply.

    Have a nice day. Cheers!
    Rupok

  • Amanda

    Wow - that was a quick reply. I am able to load reports for two of the courses though not for the others.

    When I load the reports page, the following error comes up in the 'units' drop down list.

    "trying to get property of non-object ... I have copied the block which contains that specific line below.


    }
    ?>
    </tbody>
    </table>
    <div class="tablenav">
    <div class="alignleft actions">
    <select name="units" class="chosen-select">
    <option value=""><?php _e( 'All Units', 'cp' ) ?></option>
    <?php
    $course = new Course( $current_course_id );
    $course_units = $course->get_units();
    foreach ( $course_units as $course_unit ) {
    ?>
    <option value="<?php echo $course_unit->ID; ?>"><?php echo $course_unit->post_title; ?></option>
    <?php
    }
    ?>

    </select>
    <?php submit_button( __( 'Generate Report', 'cp' ), 'primary', 'generate_report_button', false ); ?>
    </div>

    <div class="tablenav-pages"><?php $student_search->page_links(); ?></div>

    </div>
    <!--/tablenav-->
    </form>
    </div>

    The for two courses that do produce PDF reports, the following error comes up as the first couple of lines

    Notice: Trying to get property of non-object in /home/trainin1/public_html/wp-content/plugins/coursepress/includes/admin-pages/reports.php line 50

    It has the same sentence a second time but referring to line 54 :

    <tr>
    <td colspan="4" style="background-color:#f5f5f5;"><?php echo $course_unit->post_title; ?></td>
    </tr>
    </table>
    <?php
    $modules = Unit_Module::get_modules( $course_unit->ID );
    $input_modules_count = 0;
    foreach ( $modules as $mod ) {
    if ( isset( $mod->module_type ) && $mod->module_type !== '' ) {

  • Rupok

    Hi Amanda, hope you had a wonderful day.

    Can you please specify which two Courses are working fine? I'll test on others.

    I could tell you better about the issue if I could see it live, check your current configuration and make some tests on your site. Would you mind allowing Support Access so we can have a closer look at this?

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Have a nice day. Cheers!
    Rupok

  • Kasia Swiderska

    Hello Amanda,

    Thank you for access - I was able to check this issue on your site and now I can confirm that we have already have bug reported about reports issues and our developer is working on fixing that.
    If possible, please attach here your whole debug log as text file and I will add it to bug report for our developer. if possible generate new debug log (rename old one to debug.log1) and then try to trigger 503 error.

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.