FREE trial links in course curriculum redirecting back to course details page

Hi,

When I was using CoursePress Pro with its default CoursePress theme, when a user who was NOT logged in was viewing the course details page and they clicked on a lesson with a FREE sample, it would open up that lesson, no problem.

However, when I switched to another theme, this stopped working for users who were NOT logged in. It still works fine if a user is logged in, but when not logged in, it doesn't work, it simply redirects to the course details page.

For example, see this page:

http://miraclesfor.me/online-courses/achieve-mind-and-emotional-mastery-and-freedom-step-by-step-today/

When you click on the FREE green buttons, as long as you are not logged in, it redirects to the same course details page.

However, if you are logged in, it will show you the free lesson all OK.

To troubleshoot, I did this:

I made a copy on my staging site, I then I:

1. changed to CoursePress theme. I did not disable any plugins at all. It worked perfectly.

2. changed to Twenty Fourteen theme. I did not disable any plugins at all. It started redirecting again.

3. I changed back to my SociallyViral theme, then deactivated ALL plugins except CoursePress Pro, MarketPress, and UberMenu. It still behaved as above, redirecting if user is logged out.

4. Switch it to the Course Press theme, and it redirects again!

So it appears that the plugins are not causing this problem, it appears to be a problem that comes up any time you use any theme other than the CoursePress theme.

I have activated Support Access on Staging, please feel free to independently test on Staging as you like.

Any ideas on how we can solve this one, @Hoang Ngo and team?

Thank you very much and have a great day,

David

  • Kasia Swiderska
    • Support nomad

    Hello David,

    I can confirm this is happening on your site - can you enable debug mode in WordPress, to see if there any errors that could show us why this is happening?
    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.

    Kind regards,
    Kasia

  • David
    • Site Builder, Child of Zeus

    Hi @Kasia Swiderska

    Thanks for the help.

    On the Staging site, I set as follows:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    I then, from a logged out position, went to:

    http://miraclesforme.staging.wpengine.com/online-courses/a-happy-pocket-full-of-money-2-0-financial-spiritual-abundance-in-15-hours/

    I tried clicking on some of the FREE links. Redirects happened. No errors showed onscreen. But attached is the debug log file generated.

    What do you make of it?

    Thanks,

    David

  • David
    • Site Builder, Child of Zeus

    Hi @Kasia Swiderska,

    My apologies. OK, I have re-attached it here as a text file. It is not long, it only covers errors recorded during the test period from [12-Nov-2015 04:29:32 UTC] to [12-Nov-2015 04:33:50 UTC]. It's just that I have no idea which error to focus on!

    Thanks,

    David

  • David
    • Site Builder, Child of Zeus

    @Kasia Swiderska

    BTW, the debug is still enabled on the Staging site. If you additionally need any specific time range as you do your tests, let me know and I can fetch the appropriate lines.

    Thanks again!

  • David
    • Site Builder, Child of Zeus

    Hi @Kasia Swiderska,

    Thanks! Much appreciated.

    I don't mean to be pushy but may I please add:

    1. Any chance they could fast-track this fix? I ask because the lack of free trial capability really does kill conversion rates and hurts sales, so the sooner the better. Just a polite request :slight_smile:

    2. Perhaps later on when the developer has some extra time (or now if (s)he can), they can also notice that if the theme is any other theme other than the default CoursePress theme, the lessons pages show all messed up (poor layout, repeated titles, tiny navigation links, and strange comments being grabbed from somewhere). Further more, there is no apparent way for the webmaster to fix said appearance except by hacking it using custom CSS. Please see the attached screenshots to see what I mean.

    However, #1 is urgent as its costing sales conversions. We can somewhat live with #2 for now, it isn't as urgent as #1.

    Thanks again and have a lovely evening!

    David

  • Kasia Swiderska
    • Support nomad

    Hello David,

    I've asked dev if we could have hot fix for this issue, so I could give it to you ASAP.

    Further more, there is no apparent way for the webmaster to fix said appearance except by hacking it using custom CSS.

    On some themes courses are looking quite nice (like in default WordPress themes) - but in some the custom CSS is needed - this is because CoursePress is using virtual pages and not every theme is handling them properly.

    Kind regards,
    Kasia

  • Rupok
    • Support Ninja

    Hi David

    I hope you had a wonderful day.

    I just checked the status of the fix and and our developer said he will look into this asap as working on performance issue at the moment. He asked to confirm the gateway you are using and the currents settings. So would you mind allowing support access so we can have necessary information on this to fix this asap?
    To enable support access you can follow this guide here:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Have a nice day. Cheers!
    Rupok

  • David
    • Site Builder, Child of Zeus

    Hi @Rupok,

    Yes, my day is going great, thanks. Hope yours is, too!

    I am using PayPal only as the gateway. I have enabled Support Access on both the live and the staging sites. Looking forward to the fix :slight_smile:

    Thanks and enjoy your weekend.

    David

  • Rupok
    • Support Ninja

    Hi David

    Thanks for granting support access. I've forwarded necessary information required by developer and I believe, he will come up with a solution very soon. We will let you know as soon as we get any update from our developer.

    Have a nice day. Cheers!
    Rupok

  • Rupok
    • Support Ninja

    Hi David

    I'll really be very happy to tell you that the fix is available but unfortunately today is not that day. I'm asking the developer once again about the progress and I really believe he will come up with a fix very soon. I apologize but I can't give you any ETA on this.

    Have a nice day. Cheers!
    Rupok

  • Jose
    • Bruno Diaz

    Hi there David,

    Apologizes for the delay to provide a solution.

    I've found and fixed the issue, but we are still not ready to push a new release live.

    You will need to apply the patch manually.

    In order to do so, please download the attached zip file and use the contained php file to replace via FTP the following file in your install:
    wp-content/plugins/coursepress/includes/templates/course-units-single.php

    Let us know if you need help to make this change.

    Cheers,
    José

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.