Coursepress Reports Not Working

Hi, The PDF reports facility within Coursepress is not working. Every time I try to generate a report, I get an error page.

  • Adam Czajczyk
    • Support Gorilla

    Hello Roger,

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

    I've visited your site's dashboard and can confirm that instead of a report site is responding with an error message. The error returned is a "500 internal server error" which is a bit unfortunate because it's one of the most "undefined" HTTP errors and can be caused by a number of reasons.

    In case of WordPress it's usually caused by memory issues and raising WP memory limit often helps. I can see on your site however that it's already pretty high so there's no point in increasing it.

    The next step would be to perform a full theme/plugin conflict test as described on the flow chart in this article:

    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Could you please perform that check and let me know the result? This would either give me a clue what may be a main culprit here or we'll continue with further troubleshooting.

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hello Roger,

    Thank you for your response.

    I checked your site again and the "500 intenal server error" response (HTTP server response to browser request) is still there indeed. Since you managed to eliminate the theme/plugin conflict test, let's please try to eliminate two other reasons:

    1. There's been an update to CoursePress released just today. It is not addressing this issue but it happens sometimes that one fix "accidentally" fixes other issues as well. You may not see an update in your WPMU DEV Dashboard yet but it should appear there any moment so please update CoursePress to the most recent (1.3.2) version.

    2. Assuming that this doesn't help, please try following "trick":

    - access your site via FTP
    - go to "/wp-content/plugins/coursepress/includes/external/tcpdf/config/" folder
    - there are two files inside:

    "tcpdf_config.php" and "tcpdf_config_alt.php"

    - rename them so they "swap" with each other ("tcpdf_config.php" -> "tcpdf_config_alt.php" and "tcpdf_config_alt.php" -> "tcpdf_config.php")

    Let me know if this helped please. In case it didn't, please rename the files back to as they were and I'll keep investigating.

    Best regards,
    Adam

  • Predrag Dubajic
    • Support

    Hi Roger,

    Can you enable debug log in your wp-config.php by replacing define('WP_DEBUG', false); 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 debug.log file in your wp-content folder that could tell us what is going on.
    After enabling it try creating PDF report and the log should populate with errors, save it as .txt file and attach it here so we could check what's causing it.

    Best regards,
    Predrag

  • Adam Czajczyk
    • Support Gorilla

    Hello Roger,

    Thanks for granting access. I checked the site again and compared settings with debug.log file that you provided us with. The WordPress memory is indeed currently set to 512M but PHP limit is 256M and this is the upper limit WordPress can reach despite "wp-config.php" setting.

    The debug log indicates that WP tried to allocate more than 256M while trying to generate report. The course includes 16 units content-rich and it seems in this memory is a bit too low. Raising WordPress memory limit even more will not help here as PHP puts a line at 256M.

    The question is: does your host allow allocating more memory to PHP? If so, I'd try giving PHP at least 384M and I think this should help here. WordPress would be able then to use all that memory so CoursePress should be able to complete task.

    That said, could you please check if it would be possible to increase PHP memory limit at your server?

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.