Title: Error autoScriptToLang
Last modified: May 18, 2023

---

# Error autoScriptToLang

 *  [stefan22](https://wordpress.org/support/users/stefan22/)
 * (@stefan22)
 * [3 years ago](https://wordpress.org/support/topic/error-autoscripttolang/)
 * 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.2CF7 to PDF Version – 4.0.2Contact
   Form Version – 5.5.3
 * Also tested on localhost with PHP – v8.0.28 same error
 *     ```wp-block-code
       [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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-autoscripttolang%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [ZealousWeb](https://wordpress.org/support/users/zealopensource/)
 * (@zealopensource)
 * [3 years ago](https://wordpress.org/support/topic/error-autoscripttolang/#post-16750363)
 * Hello [@stefan22](https://wordpress.org/support/users/stefan22/) 
   Thank you for
   reporting us, we will review it and get back to you soonRegards
 *  Thread Starter [stefan22](https://wordpress.org/support/users/stefan22/)
 * (@stefan22)
 * [3 years ago](https://wordpress.org/support/topic/error-autoscripttolang/#post-16750547)
 * I commented this and it works
 * [https://ibb.co/SXh1jx2](https://ibb.co/SXh1jx2)
    -  This reply was modified 3 years ago by [stefan22](https://wordpress.org/support/users/stefan22/).
    -  This reply was modified 3 years ago by [stefan22](https://wordpress.org/support/users/stefan22/).
    -  This reply was modified 3 years ago by [stefan22](https://wordpress.org/support/users/stefan22/).
 *  Thread Starter [stefan22](https://wordpress.org/support/users/stefan22/)
 * (@stefan22)
 * [3 years ago](https://wordpress.org/support/topic/error-autoscripttolang/#post-16751621)
 * Also I have another error:
 * Uncaught TypeError: Cannot access offset of type string on string
 *     ```wp-block-code
       [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](https://wordpress.org/support/users/stefan22/)
 * (@stefan22)
 * [3 years ago](https://wordpress.org/support/topic/error-autoscripttolang/#post-16754995)
 * I found the problem to the above error “Uncaught TypeError: Cannot access offset”
 * Someone forgot to add “ifset” function. Change line 105 to this –
 *     ```wp-block-code
       if(isset($setting_data['cf7_pdf_link_is_enable']) && $setting_data['cf7_pdf_link_is_enable'] == 'false') {
       ```
   
 *  Plugin Author [ZealousWeb](https://wordpress.org/support/users/zealopensource/)
 * (@zealopensource)
 * [3 years ago](https://wordpress.org/support/topic/error-autoscripttolang/#post-16757521)
 * Hii [@stefan22](https://wordpress.org/support/users/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](https://ibb.co/SXh1jx2)”
   mpdf class is not a solution, that wont generate pdf
 *  Plugin Author [ZealousWeb](https://wordpress.org/support/users/zealopensource/)
 * (@zealopensource)
 * [3 years ago](https://wordpress.org/support/topic/error-autoscripttolang/#post-16763222)
 * Hello [@stefan22](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/generate-pdf-using-contact-form-7/assets/icon-256x256.jpg?
   rev=3240636)
 * [Generate PDF using Contact Form 7](https://wordpress.org/plugins/generate-pdf-using-contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/generate-pdf-using-contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/generate-pdf-using-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/generate-pdf-using-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/generate-pdf-using-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/generate-pdf-using-contact-form-7/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [ZealousWeb](https://wordpress.org/support/users/zealopensource/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/error-autoscripttolang/#post-16763222)
 * Status: not resolved