• I have a problem with this. Two errors actually. It looks like it cannot load mpdf class. PHP Fatal error: ?Uncaught Error: Attempt to assign property “autoScriptToLang” on null

    PHP Version – 8.1.19
    WordPress version – 6.2
    CF7 to PDF Version – 4.0.2
    Contact Form Version – 5.5.3

    Also tested on localhost with PHP – v8.0.28 same error

    [18-May-2023 02:34:57 UTC] PHP Warning: ?Undefined array key "cf7_dettach_pdf" in /www/doc/www.edusteps.sk/www/wp-content/plugins/generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php on line 114
    
    [18-May-2023 02:34:57 UTC] PHP Fatal error: ?Uncaught Error: Attempt to assign property "autoScriptToLang" on null in /www/doc/www.edusteps.sk/www/wp-content/plugins/generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php:210
    
    Stack trace:
    
    #0 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(310): Cf7_Pdf_Generation_Front_Action->wpcf7_pdf_attachment_script(Object(WPCF7_ContactForm))
    
    #1 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    
    #2 /www/doc/www.edusteps.sk/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    
    #3 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(617): do_action_ref_array('wpcf7_before_se...', Array)
    
    #4 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(86): WPCF7_Submission->before_send_mail()
    
    #5 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(27): WPCF7_Submission->proceed()
    
    #6 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/contact-form.php(1042): WPCF7_Submission::get_instance(Object(WPCF7_ContactForm), Array)
    
    #7 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/rest-api.php(336): WPCF7_ContactForm->submit()
    
    #8 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(1181): WPCF7_REST_Controller->create_feedback(Object(WP_REST_Request))
    
    #9 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(1028): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/contact-form-7...', Array, NULL)
    
    #10 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch(Object(WP_REST_Request))
    
    #11 /www/doc/www.edusteps.sk/www/wp-includes/rest-api.php(410): WP_REST_Server->serve_request('/contact-form-7...')
    
    #12 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(308): rest_api_loaded(Object(WP))
    
    #13 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    
    #14 /www/doc/www.edusteps.sk/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    
    #15 /www/doc/www.edusteps.sk/www/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array)
    
    #16 /www/doc/www.edusteps.sk/www/wp-includes/class-wp.php(780): WP->parse_request('')
    
    #17 /www/doc/www.edusteps.sk/www/wp-includes/functions.php(1334): WP->main('')
    
    #18 /www/doc/www.edusteps.sk/www/wp-blog-header.php(16): wp()
    
    #19 /www/doc/www.edusteps.sk/www/index.php(17): require('/www/doc/www.ed...')
    
    #20 {main}
    
    ? thrown in /www/doc/www.edusteps.sk/www/wp-content/plugins/generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php on line 210

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author ZealousWeb

    (@zealopensource)

    Hello @stefan22

    Thank you for reporting us, we will review it and get back to you soon

    Regards

    Thread Starter stefan22

    (@stefan22)

    I commented this and it works

    https://ibb.co/SXh1jx2

    • This reply was modified 1 year, 6 months ago by stefan22.
    • This reply was modified 1 year, 6 months ago by stefan22.
    • This reply was modified 1 year, 6 months ago by stefan22.
    Thread Starter stefan22

    (@stefan22)

    Also I have another error:

    Uncaught TypeError: Cannot access offset of type string on string

    [19-May-2023 13:21:00 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /www/doc/www.edusteps.sk/www/wp-content/plugins/generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php:105
    Stack trace:
    #0 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(310): Cf7_Pdf_Generation_Front_Action->wpcf7_pdf_attachment_script(Object(WPCF7_ContactForm))
    #1 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #2 /www/doc/www.edusteps.sk/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    #3 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(617): do_action_ref_array('wpcf7_before_se...', Array)
    #4 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(86): WPCF7_Submission->before_send_mail()
    #5 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(27): WPCF7_Submission->proceed()
    #6 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/contact-form.php(1042): WPCF7_Submission::get_instance(Object(WPCF7_ContactForm), Array)
    #7 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/rest-api.php(336): WPCF7_ContactForm->submit()
    #8 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(1181): WPCF7_REST_Controller->create_feedback(Object(WP_REST_Request))
    #9 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(1028): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/contact-form-7...', Array, NULL)
    #10 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #11 /www/doc/www.edusteps.sk/www/wp-includes/rest-api.php(410): WP_REST_Server->serve_request('/contact-form-7...')
    #12 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(308): rest_api_loaded(Object(WP))
    #13 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #14 /www/doc/www.edusteps.sk/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    #15 /www/doc/www.edusteps.sk/www/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array)
    #16 /www/doc/www.edusteps.sk/www/wp-includes/class-wp.php(780): WP->parse_request('')
    #17 /www/doc/www.edusteps.sk/www/wp-includes/functions.php(1334): WP->main('')
    #18 /www/doc/www.edusteps.sk/www/wp-blog-header.php(16): wp()
    #19 /www/doc/www.edusteps.sk/www/index.php(17): require('/www/doc/www.ed...')
    #20 {main}
      thrown in /www/doc/www.edusteps.sk/www/wp-content/plugins/generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php on line 105
    [19-May-2023 13:23:45 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /www/doc/www.edusteps.sk/www/wp-content/plugins/generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php:105
    Stack trace:
    #0 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(310): Cf7_Pdf_Generation_Front_Action->wpcf7_pdf_attachment_script(Object(WPCF7_ContactForm))
    #1 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #2 /www/doc/www.edusteps.sk/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    #3 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(617): do_action_ref_array('wpcf7_before_se...', Array)
    #4 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(86): WPCF7_Submission->before_send_mail()
    #5 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/submission.php(27): WPCF7_Submission->proceed()
    #6 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/contact-form.php(1042): WPCF7_Submission::get_instance(Object(WPCF7_ContactForm), Array)
    #7 /www/doc/www.edusteps.sk/www/wp-content/plugins/contact-form-7/includes/rest-api.php(336): WPCF7_ContactForm->submit()
    #8 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(1181): WPCF7_REST_Controller->create_feedback(Object(WP_REST_Request))
    #9 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(1028): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/contact-form-7...', Array, NULL)
    #10 /www/doc/www.edusteps.sk/www/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #11 /www/doc/www.edusteps.sk/www/wp-includes/rest-api.php(410): WP_REST_Server->serve_request('/contact-form-7...')
    #12 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(308): rest_api_loaded(Object(WP))
    #13 /www/doc/www.edusteps.sk/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #14 /www/doc/www.edusteps.sk/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    #15 /www/doc/www.edusteps.sk/www/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array)
    #16 /www/doc/www.edusteps.sk/www/wp-includes/class-wp.php(780): WP->parse_request('')
    #17 /www/doc/www.edusteps.sk/www/wp-includes/functions.php(1334): WP->main('')
    #18 /www/doc/www.edusteps.sk/www/wp-blog-header.php(16): wp()
    #19 /www/doc/www.edusteps.sk/www/index.php(17): require('/www/doc/www.ed...')
    #20 {main}
      thrown in /www/doc/www.edusteps.sk/www/wp-content/plugins/generate-pdf-using-contact-form-7/inc/front/class.cf7-pdf-generation.front.action.php on line 105
    Thread Starter stefan22

    (@stefan22)

    I found the problem to the above error “Uncaught TypeError: Cannot access offset”

    Someone forgot to add “ifset” function. Change line 105 to this –

    if(isset($setting_data['cf7_pdf_link_is_enable']) && $setting_data['cf7_pdf_link_is_enable'] == 'false') {
    Plugin Author ZealousWeb

    (@zealopensource)

    Hii @stefan22

    Is your issue resolved by adding
    isset($setting_data[‘cf7_pdf_link_is_enable’]) ?

    And above you mention you commented off ” https://ibb.co/SXh1jx2 ” mpdf class is not a solution, that wont generate pdf



    Plugin Author ZealousWeb

    (@zealopensource)

    Hello @stefan22

    Did you found the solution? You may contact us and also take the support from our official website

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error autoScriptToLang’ is closed to new replies.