• Resolved dantheman1981

    (@dantheman1981)


    Hi,

    I can view and print certificates but when I try to click the ‘save’ or ‘download’ button I get an error.

    “There has been a critical error on your website. Learn more about debugging in WordPress.”

    Any help appreciated.

    Thanks,

    Dan.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Rocco Aliberti

    (@d4z_c0nf)

    Hi there,
    sorry to hear you’re experiencing this issue, I’m not able to reproduce it on my test website.

    What you’re experiencing is the equivalent of a White Screen of Death (WSOD), it’s impossible to say what’s going wrong there without additional information. Please see our Guide to Debugging a White Screen.

    Also, could you please provide us with your LifterLMS System Report?

    Thread Starter dantheman1981

    (@dantheman1981)

    Hi Rocco,

    Below is my LifterLMS System Report. Thanks for your help and look forward to your response.

    WordPress
    -------------------------------------------
    
    Home Url: https://---.com.au
    Site Url: https://---.com.au
    Login Url: https://---.com.au/wp-login.php
    Version: 5.4
    Debug Mode: No
    Debug Log: No
    Debug Display: Yes
    Locale: en_US
    Multisite: No
    Page For Posts: Not Set
    Page On Front: Home (#12) [https://---.com.au/]
    Permalink Structure: /%postname%/
    Show On Front: page
    Wp Cron: Yes
    
    Settings
    -------------------------------------------
    
    Version: 3.37.18
    Db Version: 3.37.18
    Course Catalog: COURSE LIBRARY (#422) [https://---.com.au/course-library/]
    Membership Catalog: Membership Catalog (#359) [https://servoskills.com.au/memberships/]
    Student Dashboard: STUDENT DASHBOARD (#361) [https://---.com.au/student-dashboard/]
    Checkout Page: Purchase (#360) [https://---.com.au/purchase/]
    Course Catalog Per Page: 9
    Course Catalog Sorting: menu_order,ASC
    Membership Catalog Per Page: 9
    Membership Catalog Sorting: menu_order
    Site Membership: Not Set
    Courses Endpoint: my-courses
    Edit Endpoint: edit-account
    Lost Password Endpoint: lost-password
    Vouchers Endpoint: 
    Autogenerate Username: yes
    Password Strength Meter: no
    Minimum Password Strength: strong
    Terms Required: no
    Terms Page: Not Set
    Checkout Names: required
    Checkout Address: hidden
    Checkout Phone: hidden
    Checkout Email Confirmation: yes
    Open Registration: yes
    Registration Names: required
    Registration Address: hidden
    Registration Phone: hidden
    Registration Voucher: required
    Registration Email Confirmation: yes
    Account Names: required
    Account Address: optional
    Account Phone: optional
    Account Email Confirmation: yes
    Confirmation Endpoint: confirm-payment
    Force Ssl Checkout: no
    Country: AU
    Currency: AUD
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Decimals: 2
    Trim Zero Decimals: no
    Recurring Payments: yes
    Email From Address: admin@---.com.au
    Email From Name: ---
    Email Footer Text: 
    Email Header Image: 
    Cert Bg Width: 800
    Cert Bg Height: 616
    Cert Legacy Compat: no
    
    Gateways
    -------------------------------------------
    
    Manual: Disabled
    Manual Logging: 
    Manual Order: 1
    
    Server
    -------------------------------------------
    
    Mysql Version: 5.7.29
    Php Curl: Yes
    Php Default Timezone: UTC
    Php Fsockopen: Yes
    Php Max Input Vars: 1000
    Php Max Upload Size: 8 MB
    Php Memory Limit: 256M
    Php Post Max Size: 8M
    Php Soap: No
    Php Suhosin: No
    Php Time Limt: 30
    Php Version: 7.2.27
    Software: Apache
    Wp Memory Limit: 40M
    
    Browser
    -------------------------------------------
    
    HTTP USER AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36
    
    Theme
    -------------------------------------------
    
    Name: Astra
    Version: 2.4.2
    Themeuri: https://wpastra.com/
    Authoruri: https://wpastra.com/about/
    Template: 
    Child Theme: No
    Llms Support: Yes
    
    Plugins
    -------------------------------------------
    
    Astra Hooks: 1.0.2
    Astra Pro: 2.4.0
    Classic Editor: 1.5
    Contact Form 7: 5.1.7
    Elementor: 2.9.7
    Elementor - Header, Footer & Blocks: 1.4.1
    LifterLMS: 3.37.18
    Really Simple SSL: 3.3.1
    Starter Templates: 2.2.1
    Ultimate Addons for Gutenberg: 1.14.8
    Under Construction: 3.75
    WPForms Lite: 1.5.9.5
    Yoast SEO: 13.5
    
    Integrations
    -------------------------------------------
    
    BbPress: No
    BuddyPress: No
    
    Template Overrides
    -------------------------------------------
    Plugin Contributor Rocco Aliberti

    (@d4z_c0nf)

    Hi Dan,
    thanks for the system info!
    I’ve tried to reproduce the issue installing your plugins (except for the premium one Astra Pro) and theme on my test install, but I could download/save the certificate without any issues.

    At this point you need to debug that error by enabling the debug logging:

    Debugging in WordPress

    Then when the issue reproduces you should be able to see one or more errors logged in your wp-content/debug.log that would help understanding what’s happening 🙂

    Thread Starter dantheman1981

    (@dantheman1981)

    Hi Rocco,

    Thanks. So I have run the debug logging. This is what is shown from the log. I have also included below the extended error I am now getting when clicking on the ‘download’ button.

    From the log:

    [23-Apr-2020 00:36:23 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mb_convert_encoding() in /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php:228
    Stack trace:
    #0 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php(188): LLMS_Certificates->modify_dom(‘<!DOCTYPE html>…’)
    #1 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php(105): LLMS_Certificates->get_export_html(‘2060’)
    #2 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php(161): LLMS_Certificates->generate_export(‘/home/d08hqumg/…’, ‘2060’)
    #3 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/controllers/class.llms.controller.certificates.php(149): LLMS_Certificates->get_export(‘2060’)
    #4 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/controllers/class.llms.controller.certificates.php(111): LLMS_Controller_Certificates->download(‘2060’)
    #5 /home/d08hqumg/public_html/wp-includes/cla in /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php on line 228

    Error Message:

    Fatal error: Uncaught Error: Call to undefined function mb_convert_encoding() in /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php:228 Stack trace: #0 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php(188): LLMS_Certificates->modify_dom(‘<!DOCTYPE html>…’) #1 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php(105): LLMS_Certificates->get_export_html(‘2064’) #2 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php(161): LLMS_Certificates->generate_export(‘/home/d08hqumg/…’, ‘2064’) #3 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/controllers/class.llms.controller.certificates.php(149): LLMS_Certificates->get_export(‘2064’) #4 /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/controllers/class.llms.controller.certificates.php(111): LLMS_Controller_Certificates->download(‘2064’) #5 /home/d08hqumg/public_html/wp-includes/cla in /home/d08hqumg/public_html/wp-content/plugins/lifterlms/includes/class.llms.certificates.php on line 228

    Plugin Contributor Rocco Aliberti

    (@d4z_c0nf)

    Hi Dan,
    thanks!

    Fatal error: Uncaught Error: Call to undefined function mb_convert_encoding()

    Looks like your PHP doesn’t include the multibyte string support.
    Can you ask your hosting provider to enable it?

    Thread Starter dantheman1981

    (@dantheman1981)

    Hi Rocco,

    So with the help of my hosting provider we enabled multibyte string. There was some other issues but they were able to fix form me. They referred to this website – https://github.com/gocodebox/lifterlms/issues/1118

    Thanks so much for your help.

    Dan.

    Thread Starter dantheman1981

    (@dantheman1981)

    This from the hosting provider (thought you may be interested incase someone else has the same issue):

    In case you wanted to know the culprit:

    $img->setAttribute( ‘src’, ‘data:’ . mime_content_type( $imgpath ) . ‘;base64,’ . $data );

    The above code had to be removed from the plugin as the function was ‘Non-existent’ according to the above error. So removing it solved the issue.

    Plugin Contributor Rocco Aliberti

    (@d4z_c0nf)

    Hi Dan,
    good to hear!

    They referred to this website – https://github.com/gocodebox/lifterlms/issues/1118

    Yeah that’s the issue I opened after replying to you here 😀

    This from the hosting provider (thought you may be interested incase someone else has the same issue):

    In case you wanted to know the culprit:

    $img->setAttribute( ‘src’, ‘data:’ . mime_content_type( $imgpath ) . ‘;base64,’ . $data );

    The above code had to be removed from the plugin as the function was ‘Non-existent’ according to the above error. So removing it solved the issue.

    Ok, so there’s an another error, once they enabled the multibyte string support, that popped out, and regards to the function mime_content_type as I understand.

    The thing is that that function is a built-in PHP function, which I guess your hosting provider has disabled for some valid reason.

    But what do they do instead of enabling it? They changed your plugin code?
    If so, be aware that you’ll lose that change as soon as you update the plugin…

    Plugin Support Natalie

    (@nrherron)

    Hi @dantheman1981,

    Since we haven’t heard back from you we are going to close this topic out.

    If you still have further questions for us however, feel free to reply here or open a new thread!

    Thanks and take care,

    Plugin Contributor Rocco Aliberti

    (@d4z_c0nf)

    Hi Dan,
    just wanted to inform you that LifterLMS v3.38.1 fixes the issue you encountered due to the PHP mime_content_type() function not available on your host.

    Best

    Thread Starter dantheman1981

    (@dantheman1981)

    Thanks Rocco!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Certificate download error’ is closed to new replies.