Error message after activiting coursepro

I installed and activated the plugin on http://www.troymedia.com but when I went to check the site the screen was blank except for an error message.

When I deactivated the plugin I was able to see the site again.

Should I be installing the plugin on troymedia.com or should I create a new site specific to coursepro? I did want to you your theme for the course pro site.

  • Vinod Dalvi

    Hi Troy,

    Welcome to the WPMU Dev community and thanks for posting on the forum.

    I have just tested it on my test site using latest version of CoursePress Pro plugin and found it's working fine without any issue.

    I installed and activated the plugin on http://www.troymedia.com but when I went to check the site the screen was blank except for an error message.

    When I deactivated the plugin I was able to see the site again.

    I logged in to your site using support staff access and temporary activated the CoursePress Pro plugin and found the front end of your site is displaying as blank white page without any error message.

    What error message are you getting?.

    Can you please try temporary enabling WP_DEBUG mode? To do this, just go to wp-config.php include this:

    define('WP_DEBUG',true);

    You might already have a line for WP_DEBUG, so just make sure it's set to true.

    For information on this, checkout this wpmu.org article.

    Let me know what errors if any you are getting when you face this issue.

    Should I be installing the plugin on troymedia.com or should I create a new site specific to coursepro?

    You don't need to create separate site for CoursePress Pro as it will also work with your existing site.

    This can be due to plugin/theme conflict on your site.

    You can just try on your development site temporary using default WordPress theme like Twenty Fifteen and temporary deactivating all other plugins as displayed in the following flowchart to know which theme/plugin is conflicting if any.

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

    I did want to you your theme for the course pro site.

    Yes sure you can use the CoursePress theme which you will find in the following directory of CoursePress Pro plugin

    /wp-content/plugins/coursepress/themes/coursepress/

    To use the coursepress theme you have to copy it from the above directory to the themes directory of your WordPress install.

    Kind Regards,
    Vinod Dalvi

  • Troy Media

    The error message is:
    Fatal error: Cannot redeclare get_categories() (previously declared in /home/troymedi/public_html/wp-includes/category.php:22) in /home/troymedi/public_html/includes/functions.php on line 1252

    When I set debug to true I get this error message:
    Strict Standards: Only variables should be passed by reference in /home/troymedi/public_html/wp-content/plugins/oiopub-direct/wp.php on line 14

  • Troy Media

    <?php if (!in_array($_SERVER["REMOTE_ADDR"], array("50.65.109.130")) && file_exists('/home/troymedi/public_html/wp-content/plugins/gotmls/safe-load/wp-login.php')) require_once('/home/troymedi/public_html/wp-content/plugins/gotmls/safe-load/wp-login.php'); // Load Brute-Force Protection by GOTMLS.NET before the WordPress bootstrap. ?><?php
    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information
    * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
    * wp-config.php} Codex page. You can get the MySQL settings from your web host.
    *
    * This file is used by the wp-config.php creation script during the
    * installation. You don't have to use the web site, you can just copy this file
    * to "wp-config.php" and fill in the values.
    *
    * @package WordPress
    */

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    //define('WP_CACHE', true); //Added by WP-Cache Manager
    define( 'WPCACHEHOME', '/home/troymedi/public_html/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager
    define('DB_NAME',);

    /** MySQL database username */
    define('DB_USER',);

    /** MySQL database password */
    define('DB_PASSWORD', );

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    /**#@+
    * Authentication Unique Keys and Salts.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define('AUTH_KEY', 'bocfgeco4twms5qvwytcyeba840mygjuinr7ja9nbysdrlkavnuja9ykxupxdisd');
    define('SECURE_AUTH_KEY', 'jqocb0tqby2y9i9ot2hddws5678s4bsarcxyl0v3ipsuuinukrjycejgo3paqsfq');
    define('LOGGED_IN_KEY', 'ud7wxqv7gdecptknuzpzjflmjvri7fjznugnkcfsdpbshkhaixpvni57uwdzyrcr');
    define('NONCE_KEY', '1z3e9xdj3m1vvgwcndrojfulififwn6hyptef6czv9rkfg0pefhjtbpwno242dqn');
    define('AUTH_SALT', 'hetz51twd9ixcbfeklgyjuzggvpu57leopclebiud70b8qktjsmfemvigg94zc0t');
    define('SECURE_AUTH_SALT', 'otwowjdxoanmvbwvebd6nxufuby2kunztathudxspawsdsbmdi5tavum1nwgaonh');
    define('LOGGED_IN_SALT', 'sc39ddsqp3enfntv4srv8smvzjyxq4jassvt7zjoji1gzvvmegmlecrbmx6owjai');
    define('NONCE_SALT', 'anl3fyruglmcf8a7jt4ccdvbvn9rvxonx81l7tnlumpgku9avsolxftap9xnfvm9');

    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = 'wp_';

    /**
    * WordPress Localized Language, defaults to English.
    *
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
    * language support.
    */
    define ('WPLANG', '');

    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    */
    define('WP_DEBUG', false);

    define('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'www.troymedia.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    /* That's all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    define( 'WP_POST_REVISIONS', 2 );
    define( 'AUTOSAVE_INTERVAL', 300 );
    define( 'EMPTY_TRASH_DAYS', 2 );

  • Vinod Dalvi

    Hi Troy,

    I could confirm that the issue is occurring only in the front end of your site and not in the admin area after activating the CoursePress Pro plugin.

    To resolve the error could you please try using the attached updated CoursePress Pro plugin files by replacing the following files in the CoursePress Pro plugin directory.

    /wp-content/plugins/coursepress/includes/classes/class.course.php
    /wp-content/plugins/coursepress/includes/classes/class.shortcodes.php

    The above updated files changes the function name from get_categories to get_course_categories which is declared statically in the Course class.

    Would you mind if I access your site using FTP and did some testing? This might help get to the bottom of this faster. If this is ok, just send log in info through our secured contact form: https://premium.wpmudev.org/contact/
    - Choose "I have a different question"
    - Include my name in the subject "Vinod Dalvi"
    - Include the URL of this post in your message so that I may track this issue better
    - Include login information (Wordpress admin info username + password )
    - Include FTP Details

    Best Regards,
    Vinod Dalvi

  • Vinod Dalvi

    Hi Troy,

    Thank you for sending the site details.

    I troubleshooted the issue on your site and found it's not the CoursePress Pro plugin issue but the issue with the function get_categories declared in the following file of your site as shown in the attached screenshot

    /home/troymedi/public_html/includes/functions.php

    I am not sure why you have added the code in the above file. It's only that the issue is causing after activating the CoursePress Pro plugin but the function get_categories is redeclared in the above file so if you rename it to anything else then the issue will be resolved.

    Also please note you are using the cache plugin so after making any changes you should clear the cache from the plugin settings.

    Regards,
    Vinod Dalvi

  • Ash

    Hello @Troy Media

    Now I can see the error comes from oiopub-direct plugin. Would you please run a plugin conflict test? Please deactivate all plugins except this one and check if you still face the problem. If not, then enable one by one and check which one is causing the problem. You can see the flowchart here: https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Please let me know what you get.

    Cheers
    Ash

  • Vinod Dalvi

    Hi Troy,

    I can't place the cursur in the Course Description box under Step 2 - Course Description.
    Any ideas?

    It's working fine on my test site.

    Would you mind if I logged in to your site and did some troubleshooting? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.