I have had

I have had to create a new sub directory WP installation as upfront is not compatible with coursepress pro that I am using on the main site.
Having installed wpmudev on the installation, I have tried to load coursepress pro as well. once I try to activate it, it cause the new wp installation to go blank and nothing can be accessed.
Do you have any idea as to how I can solve this problem?
Thanks
Tony

  • Adam Czajczyk
    • Support Gorilla

    Hello Tony,

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

    That is most likely caused by the WordPress memory limit so please start with adding following line to the "wp-config.php" file of your new install:

    define('WP_MEMORY_LIMIT','256M');

    This line should be located right above the "/* That's all, stop editing... */" line.

    Once it's there, make sure that you cleared all caches (if there are any) and try enabling CoursePress Pro again. Let me know if that worked for you please.

    Kind regards,
    Adam

  • Tony
    • Design Lord, Child of Thor

    Hi Adam,

    Tried that and no result.
    Adding that code was to the new install and not the main one I assume?
    Regards
    I'm having to remove coursepress pro from the Cpanel file section as it prevents anything from showing on the WP side of things, and that is even before I activate the plugin.
    Thoughts please :slight_smile:
    I'm also using the wordpress theme 2017 in case the siteorigin one I intend to use was causing a problem.

    NB: I have just installed your Popup pro plugin and it works fine.
    regards

    Tony

  • Dimitris
    • Support Star

    Hey there Tony,

    hope you're doing good and don't mind chiming in here! :slight_smile:

    Tried that and no result.
    Adding that code was to the new install and not the main one I assume?

    Adam was referring to the new install indeed, as it's the one that deals this issue.

    I'm having to remove coursepress pro from the Cpanel file section as it prevents anything from showing on the WP side of things, and that is even before I activate the plugin.

    Could you please access your server through FTP, edit the wp-config.php file, find a line like
    define('WP_DEBUG', false);
    and replace it with the following (if the above line doesn’t exist, simply insert next snippet just above the /* That's all, stop editing! Happy blogging. */ comment)

    define('WP_MEMORY_LIMIT','256M');
    
    // 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);

    Then go ahead and try to install and activate CoursePress.
    https://premium.wpmudev.org/docs/getting-started/download-wpmu-dev-plugins-themes/

    If the error is replicated, a /wp-content/debug.log file should be created.
    Simply download it, rename it to debug.txt and attach it here in your next reply.

    Warm regards,
    Dimitris

  • Tony
    • Design Lord, Child of Thor

    Still the same result with the new code applied as well.
    The debug content is as follows:

    [29-Jan-2017 23:14:55 UTC] PHP Fatal error: Can't use function return value in write context in /home/sites/oakenwood.co.uk/public_html/glade/wp-content/plugins/coursepress/2.0/include/coursepress/data/shortcode/class-coursetemplate.php on line 425
    [29-Jan-2017 23:15:07 UTC] PHP Fatal error: Can't use function return value in write context in /home/sites/oakenwood.co.uk/public_html/glade/wp-content/plugins/coursepress/2.0/include/coursepress/data/shortcode/class-coursetemplate.php on line 425
    [29-Jan-2017 23:15:12 UTC] PHP Fatal error: Can't use function return value in write context in /home/sites/oakenwood.co.uk/public_html/glade/wp-content/plugins/coursepress/2.0/include/coursepress/data/shortcode/class-coursetemplate.php on line 425
    [29-Jan-2017 23:15:16 UTC] PHP Fatal error: Can't use function return value in write context in /home/sites/oakenwood.co.uk/public_html/glade/wp-content/plugins/coursepress/2.0/include/coursepress/data/shortcode/class-coursetemplate.php on line 425

    Hope this helps.

    regards
    Tony

  • Tony
    • Design Lord, Child of Thor

    Hi guys,

    I assume this is a problem that does not have a simple solution so may take some time to sort out.

    If that is the case can you let me know, as I have to have it sorted out by Wednesday, so may need to look for other course plugins I can use instead.

    Thanks in advance for your reply.

    regards

    Tony

  • Adam Czajczyk
    • Support Gorilla

    Hello Tony!

    Thank you for sharing the debug log.

    The log actually revealed the main culprit. It's caused by an older PHP version conflict and our developers are aware of it. There's a fix ready that should be released soon as a part of CoursePress update and for now please give a patch that I attached to this post a try.

    In order to apply it to your site (the one where the issue occurs):

    - download the .zip file attached to this post
    - extract it to your local drive
    - upload the "class-coursetemplate.php" file from an extracted zip file to the "/wp-content/plugins/coursepress/2.0/include/coursepress/data/shortcode", overwriting existing one.

    Let me know if it worked for you, please!

    Best regards,
    Adam

  • Tony
    • Design Lord, Child of Thor

    Hi Adam,
    Just do as you said.
    It worked a treat, thank you that was much appreciated.
    I assume there will be an update to course press in the near future with the changes made to accomidate this issue, and that it will update this patch as well.

    Once again thanks for sorting out them problem.

    regards

    Tony

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.