Okay
  Public Ticket #3102159
Course button loading time and crashes
Closed

Comments

  •  6
    Alberto started the conversation

    When a user is logged the course button is killing my site because it takes too long to calculate course status and course progress. In fact, if I open some windows with logged users it crash website because memory limit.

    No problem if the users are not logged.

    Is there a way that "Course button" doesn't load course status and progress?

    I have this problem from 2 years ago (link to the old ticket): https://wplms.io/support/forums/topic/course-button-loading-time/

  •  6
    Alberto replied

    And this ticket had the same problem: https://wplms.io/support/forums/topic/important-500-error-when-multiple-users-2/page/2/


    2 years ago. No solution yet?

  •  390
    Ripul replied

    memory limit is something we can not control from code. 

    Some parts of website will always take more processing because there is a lot of verification happening. The fact that it works for a huge majority means this part may not see any major change in architecture soon.


  •  390
    Ripul replied

    A quick fix for your site would be to remove the course button from the course layout and directly use the add_to_cart shortcode

  • Chala88 replied

    Doing this I would need to create a differente course layout for every course?

  • [deleted] replied

    We wont recommend that , its just a little time to load the course button which is taken there . 

    We wont recommend you to remove the course button from course layout .


    The crash happening due to some other factor there .

    You have three course buttons in single page (2 hidden and 1 visible ) : 

    https://prnt.sc/zj1pqPFedr2f

    and for each course button there is a separate call going on . WE recommend you to remove these hidden button and your issue will be solved .


    Also to prevent 500 errors please follow this : 

  •  6
    Alberto replied

    Thank you for the answer Alex.

    I deleted the 2 extra buttons and it works better.