Upgrade from 1.x to 2.0.1 CoursePress Pro glitches

Upgraded from 1.3.4.3 to 2.0.1:
1) I am using the coursepress theme. I copied it from plugins/coursepress/2.0/themes/coursepress where the 1.3.4.3 version was overwriting the old one. (Using a child-theme - courspress-child, too). Could not get it to work. Something in the system wanted it to be in plugins/coursepress/themes/coursepress. The fact that it was 2.0 was keeping Wordpress from recognizing it (theme_root set to plugins/coursepress/themes/, NOT wp-content/themes - why?!). I copied the whole theme from 2.0/coursepress to plugins/coursepress/themes/coursepress and it's now recognized. That shouldn't have been necessary.
2) I have a student login page defined. Logging in does not work. It does not redirect to student-dashboard. Worked fine in 1.3.4.3.
3) Clicking on My Chapters (My Courses) which goes to /student-dashboard used to go to courses-signup (I changed that to not-logged-in in the Settings area). It does not. If I click on My Courses when I'm not signed it, it goes to the home page.
4) Error log is constantly putting in: [16-Dec-2016 21:23:01 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started .../public_html/ffbeta/wp-includes/class.wp-styles.php:237) in .../public_html/ffbeta/wp-content/plugins/coursepress/2.0/include/coursepress/data/shortcode/class-template.php on line 1167

  • Adam Czajczyk

    Hello Robert,

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

    1) I am using the coursepress theme. I copied it from plugins/coursepress/2.0/themes/coursepress where the 1.3.4.3 version was overwriting the old one. (Using a child-theme - courspress-child, too). Could not get it to work. Something in the system wanted it to be in plugins/coursepress/themes/coursepress. The fact that it was 2.0 was keeping Wordpress from recognizing it (theme_root set to plugins/coursepress/themes/, NOT wp-content/themes - why?!). I copied the whole theme from 2.0/coursepress to plugins/coursepress/themes/coursepress and it's now recognized. That shouldn't have been necessary.

    That shouldn't have been necessary, I agree. Just to make sure though: initially - did you copied or moved the theme from plugin folder to themes folder?

    2) I have a student login page defined. Logging in does not work. It does not redirect to student-dashboard. Worked fine in 1.3.4.3.
    3) Clicking on My Chapters (My Courses) which goes to /student-dashboard used to go to courses-signup (I changed that to not-logged-in in the Settings area). It does not. If I click on My Courses when I'm not signed it, it goes to the home page.

    I checked your site (I created myself a basic account there, you may remove it anytime) and I noticed that it's not just the redirect that doesn't happen but the student is not logged in at all via the form. I believe it worked well for you with a previous version but the new CoursePress 2.0 is rewritten nearly from scratch so its code is quite different. Therefore, the first step here would be to test it against conflicts with theme (even if it's CP child theme) and other plugins. Could you do this please?

    Here's a flowchart (you may need to scroll the page down a bit) showing all the necessary steps:

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

    Let me know about results and make sure please that after you completed test, you re-granted support access.

    Best regards,
    Adam

    • Robert

      I copied the theme to the themes directory. I did not move it. After copy, I could not activate it because it was looking for it in the plugins directory but NOT in the 2.0 subdirectory. So.. I then also copied it into the plugins theme directory up one level from the 2.0 directory.

      I disabled all plugins except CoursePress Pro and tried a different theme. In all cases, trying to go to the student-dashboard page (my courses-dashboard) did not go to the Not Logged In? page and I couldn't login.

  • Adam Czajczyk

    Hello Robert!

    Thank you for this explanation.

    I copied the theme to the themes directory. I did not move it. After copy, I could not activate it because it was looking for it in the plugins directory but NOT in the 2.0 subdirectory. So.. I then also copied it into the plugins theme directory up one level from the 2.0 directory.

    I can see that currently there's the CP child theme enabled. I checked the page source in browser and this seems to be loading correct resources. See below please

    <link rel='stylesheet' id='coursepress-style-css'  href='http://beta.presentationfff.org/wp-content/themes/coursepress-child/style.css?ver=2.0.1' type='text/css' media='all' />
    
    <link rel='stylesheet' id='coursepress-responsive-navigation-css'  href='http://beta.presentationfff.org/wp-content/plugins/coursepress/2.0/themes/coursepress/css/responsive-nav.css?ver=2.0.1' type='text/css' media='all' />

    First is the child theme style.css file loaded from child theme folder and the second one is the "responsive-nav.css" that seems to be loading from plugin folder indeed but from the correct path.

    I didn't switch to parent theme but if you agree I would like to try that (just a temporary switch) to examine the page source as well. May I do this?

    Best regards,
    Adam

  • Predrag Dubajic

    Hi Robert,

    I had a look at your site but I was unable to open student dashboard page as it kept getting into redirect loop.

    It looks like it's trying to open Hello World post from trash and thus fails, do you have any plugins or anything in .htaccess that could be causing these redirects?

    I also see in your backend that your student dashboard is using some kind of custom shortcode, have you tried using the default shortcode?

    Also, in your child theme instead of using this code in style.css:
    @import url(../coursepress/style.css);
    Remove it and add this code in child theme functions.php:

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ) );
    }

    This way you can keep parent theme in its original place in CP plugin folder.

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Robert,

    The issue after login redirect seems to be happening only when page is switched from virtual to static page, I have created this issue to our developers as well.

    As for the menu item, I see that this is static page added as a menu item and the Login text is coming from page name itself, this is not something CP can handle.
    If you enable CP menu items from CP settings then the link is added directly by CP and that way it can change the value depending if you're logged in or not.

    Best regards,
    Predrag

  • Adam Czajczyk

    Hello Robert!

    I understand that's a vital issue but since it's not directly related to the one that we are dealing here with, could you please start a separate thread for it on a "Support Forum" here:

    https://premium.wpmudev.org/forums/#question

    In cases like that one where the initial issue is not strictly related to another one, we always encourage Members to keep them in separate tickets as it helps us keep better track of information and all the troubleshooting steps preformed, we can involve more support staff and sort it quicker and it also helps other Members to find information in case they came across simlar issues.

    Best regards,
    Adam

  • Dimitris

    Hey there Robert,

    hope you're doing good today!

    I can see in our internal bug tracker that this fix isn't included in any release so far but it's already in-track so most probably will be included in next version.
    I already messaged the lead devs about this issue so I'll let you know if there could be a hotfix to provide to you before next plugin release. :slight_smile:

    Warm regards,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.