Site logo

[Support request] Oddness with LearnDash!

Home Forums Support [Support request] Oddness with LearnDash!

Home Forums Support Oddness with LearnDash!

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1799893
    James

    Hi!

    I’ve had some oddness with a client using LearnDash…

    They’ve had an issue where the ‘Lesson Content/Topic List’ wasn’t being displayed at the bottom of lessons.

    They raised a ticket with LD who said it was a conflict with GP Premium. Well, it turns out that it *might be* but it’s also REALLY odd!

    What was happening is that display:none; was/is being added inline on the

    with the class .ld-lesson-topic-list

    Doing some digging around, it turns out it’s just the ‘Spacing’ section within GPP that’s doing this – WHY?!!?!?!?!?! That seems to make no sense.

    And what makes even less sense is that on some lessons, turning off ‘Spacing’ will stop the display:none being added, but on others it makes no difference and display:none is still there (after clearing caches, etc.)!

    So I’m really not convinced that it’s GPP entirely ‘at fault’ here. Why would the ‘spacing’ options be adding an inline display:none on anything?

    Anyway, I’ve fixed it by adding

    .ld-lesson-topic-list {
    display:block!important;
    }

    in the Customizer CSS – but I thought you’d like to know about this, just in case there’s any issue with GPP!

    #1800042
    David
    Staff
    Customer Support

    Hi there,

    yeah that is odd – but i can’t see it being a GP thing.
    For one, GP doesn’t know LearnDash even exists, secondly GP doesn’t add inline styles to any elements, let alone ones it don’t know about, and lastly that kinda thing would require either a PHP filter or Javascript to add an inline style if it wasn’t present in the original HTML.

    Most likely theres another front end Javascript that is adding the code – buy why disabling a module corrects it – well thats just bizzarre lol

    Do you have a link to a page where i can see the issue – might be some telltale signs as to whats going on?

    #1800162
    James

    Hi David,

    I’m glad it’s not me then!!!

    All the effected pages are behind a paywall I’m afraid.

    I’ve uploaded a screenshot showing the line in the code and the block it’s trying to hide at: https://ibb.co/vjyGpvk

    Thanks for your help.

    #1800368
    David
    Staff
    Customer Support

    Yeah that doesn’t really help 🙂 Would need to see the source code… might be worth asking LearnDash why they thought there was a conflict with GP Premium – could give some insight to the issue – but i cannot think of anything that GP/GPP would do to cause that.

    #1800489
    James

    Yeah…

    From the ticket emails forwarded by my client, it seems that LearnDash turned plugins off & on until it broke/fixed and that was about it.

    I’ll pop a demo user login into the ‘secret’ box for you to take a look at. If you view a lesson you’ll be able to see the code.

    Thanks.

    #1801288
    David
    Staff
    Customer Support

    Well this was fun.
    First i tracked down the LearnDash script to what was adding the display none inline style.

    $(document).on('learndash_video_disable_assets', function(event, status) {
            if ('undefined' === typeof learndash_video_data) {
                return false;
            }
            if ('BEFORE' == learndash_video_data.videos_shown) {
                if (true == status) {
                    $('.ld-lesson-topic-list').hide();
                    $('.ld-lesson-navigation').find('#ld-nav-content-list-' + ldVars.postID).addClass('user_has_no_access');
                    $('.ld-quiz-list').hide();
                } else {
                    $('.ld-lesson-topic-list').slideDown();
                    $('.ld-quiz-list').slideDown();
                    $('.ld-lesson-navigation').find('#ld-nav-content-list-' + ldVars.postID).removeClass('user_has_no_access');
                }
            }
        });

    This line here is setting the display none:
    $('.ld-lesson-topic-list').hide();
    And theres also this script which is adding the user_has_no_access class to the Content List in the sidebar:
    $('.ld-lesson-navigation').find('#ld-nav-content-list-' + ldVars.postID).removeClass('user_has_no_access');

    Which meant this condition is being met:

    if ('BEFORE' == learndash_video_data.videos_shown) {
                if (true == status) {

    This looked to me like the elements are auto hidden until ‘something’ is triggered by the Video…. So i played the video, skipped to the last 2 seconds and on complete the else script fired and the styles were updated which was to slide open the list…..

    Which lead me to this:

    https://www.learndash.com/support/docs/guides/video-progression/

    Simply put, it looks like the page is behaving exactly how its supposed to – which is don’t show this, until the video has been watched…..

    #1801336
    James

    Hi David,

    AHA! Now, I’d have never thought of that. It’s a shame that the LearnDash support team couldn’t have told my client that about their own product! 😉

    Anyway, fixed by a line of CSS, so all good…!

    Thanks for your help on this.

    James

    #1801433
    David
    Staff
    Customer Support

    I like a good puzzle 🙂 But yeah – might be worth sharing my reply with LearnDash lol

    Glad to be of help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.