Title: Undefined array key &#8220;embedVersion&#8221;
Last modified: April 21, 2025

---

# Undefined array key “embedVersion”

 *  Resolved [spatton99](https://wordpress.org/support/users/spatton99/)
 * (@spatton99)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/undefined-array-key-embedversion/)
 * We’re using the HubSpot Form elementor widget to embed the contact form from 
   HubSpot on the WordPress site. This morning, we started getting the warning:
   `
   Warning: Undefined array key "embedVersion" in .../wp-content/plugins/leadin/
   public/admin/widgets/class-elementorform.php on line 140.`That’s in the `render`
   function, where the code is attempting to populate a value for `embedVersion`
   that doesn’t exist in the `$settings['content']` array. The way i’ve “fixed” 
   it for the time being is to comment out setting that variable and outputting 
   it in the shortcode, but that will be overwritten with the next plugin update.
   This could be avoided by initializing the variable rather than depending on a
   value from the `$settings['content']` array.
 *     ```wp-block-code
       protected function render() {    $settings = $this->get_settings_for_display();    $content = $settings['content'];        if ( Plugin::$instance->editor->is_edit_mode() ) {        ?>            <div class="hubspot-form-edit-mode" data-attributes="<?php echo esc_attr( wp_json_encode( $content ) ); ?>">            &nbsp;            </div>            <?php            if ( empty( $content ) ) {                ?>                        <div class="hubspot-widget-empty">                        </div>                <?php            }    }    if ( ! empty( $content ) ) {            $portal_id = $content['portalId'];            $form_id   = $content['formId'];            //$version   = $content['embedVersion'];            echo do_shortcode( '[hubspot portal="' . $portal_id . '" id="' . $form_id . '" type="form" version="' /*. $version*/ . '"]' );    }}
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Support [harthur1990](https://wordpress.org/support/users/harthur1990/)
 * (@harthur1990)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/undefined-array-key-embedversion/#post-18429121)
 * Hi Thanks for reporting the issue, a fix is available at the **11.3.6** version
   where we validate the array key before assign to a variable
 * Best regards

Viewing 1 replies (of 1 total)

The topic ‘Undefined array key “embedVersion”’ is closed to new replies.

 * ![](https://ps.w.org/leadin/assets/icon-256x256.png?rev=3041936)
 * [HubSpot All-In-One Marketing - Forms, Popups, Live Chat](https://wordpress.org/plugins/leadin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leadin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leadin/)
 * [Active Topics](https://wordpress.org/support/plugin/leadin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leadin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leadin/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [harthur1990](https://wordpress.org/support/users/harthur1990/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/undefined-array-key-embedversion/#post-18429121)
 * Status: resolved