Title: Bug: module not rendering when &quot;type&quot; setting used
Last modified: August 22, 2016

---

# Bug: module not rendering when "type" setting used

 *  ResolvedPlugin Contributor [WebMan Design | Oliver Juhas](https://wordpress.org/support/users/webmandesign/)
 * (@webmandesign)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/bug-module-not-rendering-when-type-setting-used/)
 * Hi guys, me again 😉
 * This time I would like to report a bug I’ve found in Beaver Builder recently.
 * When I set up a custom module and register a form with a field ID of `type`, 
   this module is not being rendered on the page. I’ve tried with multiple modules,
   once I’ve added a `type` field into the module settings form, it doesn’t render(
   I can edit the form, though).
 * Can you please look into this issue?
 * Here is a sample code snippet to register the form:
 *     ```
       array(
         'tab_id' => array(
           'title' => 'Tab title',
           'sections' => array(
             'section_id' => array(
               'title'  => 'Section title',
               'fields' => array(
   
                 'type' => array(
                   WHATEVER_FIELD_SETTINGS_HERE
                 )
   
               )
             )
           )
         )
       )
       ```
   
 * Thanks!
 * Oliver
 * [https://wordpress.org/plugins/beaver-builder-lite-version/](https://wordpress.org/plugins/beaver-builder-lite-version/)

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

 *  Plugin Author [Justin Busa](https://wordpress.org/support/users/justinbusa/)
 * (@justinbusa)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/bug-module-not-rendering-when-type-setting-used/#post-5671016)
 * Hey Oliver,
 * I just tested this by adding a type field to one of the builtin modules and it
   worked fine. Can you double check to make sure you don’t have another field with
   the id of “type” somewhere else in the form?
 * Justin
 *  Plugin Contributor [WebMan Design | Oliver Juhas](https://wordpress.org/support/users/webmandesign/)
 * (@webmandesign)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/bug-module-not-rendering-when-type-setting-used/#post-5671029)
 * Hmmmmm. I’ve triple checked everything, there is no `type` field ID anywhere 
   else in the form fields.
 * I’ve gone ahead and tried this on the HTML module included with Beaver Builder
   Lite Version.
 * I’ve changed the `beaver-builder-lite-version/modules/html/html.php` file to:
 *     ```
       <?php
   
       /**
        * @class FLHtmlModule
        */
       class FLHtmlModule extends FLBuilderModule {
   
         /**
          * @method __construct
          */
         public function __construct()
         {
           parent::__construct(array(
             'name'     => __('HTML', 'fl-builder'),
             'description'  => __('Display raw HTML code.', 'fl-builder'),
             'category'		=> __('Advanced Modules', 'fl-builder')
           ));
         }
       }
   
       /**
        * Register the module and its form settings.
        */
       FLBuilder::register_module('FLHtmlModule', array(
         'general'    => array(
           'title'     => __('General', 'fl-builder'),
           'sections'   => array(
             'general'    => array(
               'title'     => '',
               'fields'    => array(
   
                 'type' => array(
                   'type'  => 'text',
                   'label' => 'Type testing',
                 ),
   
                 'html'     => array(
                   'type'     => 'code',
                   'editor'		=> 'html',
                   'label'     => '',
                   'rows'     => '18',
                   'preview'      => array(
                     'type'       => 'text',
                     'selector'     => '.fl-html'
                   )
                 )
               )
             )
           )
         )
       ));
       ```
   
 * and also the `beaver-builder-lite-version/modules/html/includes/frontend.php`
   file to:
 *     ```
       <div class="fl-html">
         <?php echo $settings->type . ' ...and the actual HTML contnet: ' . $settings->html; ?>
       </div>
       ```
   
 * Resulting to: [https://vimeo.com/116800143](https://vimeo.com/116800143) (password
   is: bbbug)
 * Can you please check on your side?
 * Thanks.
 * Oliver
 *  Plugin Author [Justin Busa](https://wordpress.org/support/users/justinbusa/)
 * (@justinbusa)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/bug-module-not-rendering-when-type-setting-used/#post-5671038)
 * Hey Oliver,
 * I reviewed the code for this and it looks like the $settings->type property is
   reserved by the module to store its type (e.g. heading, rich-text, photo). Can
   you use another id for that field?
 * Justin
 *  Plugin Contributor [WebMan Design | Oliver Juhas](https://wordpress.org/support/users/webmandesign/)
 * (@webmandesign)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/bug-module-not-rendering-when-type-setting-used/#post-5671060)
 * Hi Justin,
 * Yes, I’ve done this already. I’ve added an additional parameter to my shortcodes
   which then translates to the original “type” parameter. This solution doesn’t
   seem very OK to me…
 * So there is no chance I can use a “type” field ID/name in Beaver Builder and 
   this can not be resolved?
 * Thank you for your help!
 * Regards,
 * Oliver
 *  Plugin Author [Justin Busa](https://wordpress.org/support/users/justinbusa/)
 * (@justinbusa)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/bug-module-not-rendering-when-type-setting-used/#post-5671104)
 * Hey Oliver,
 * The reason modules already have a type parameter in their settings object is 
   because they also have a type parameter on the main object.
 * The reason for that is because modules are “nodes” just as rows, column-groups
   and columns are. Nodes all have the same internal structure so they can be acted
   upon using a common set of methods. In many of those methods, we need to know
   what type of node we are working on, that’s why we have the $node->type parameter.
 * Modules are a bit different as there can be many types of modules, as opposed
   to the others where there is only one type. As such, we are storing the type 
   of module in the settings object so we can differentiate between them. It’s not
   stored on the main object to keep the structure consistent with other nodes.
 * If you unserialize the _fl_builder_data post meta you may get a better understanding
   of the builder’s data structure.
 * I hope that makes sense!
 * Thanks,
    Justin
 *  Plugin Contributor [WebMan Design | Oliver Juhas](https://wordpress.org/support/users/webmandesign/)
 * (@webmandesign)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/bug-module-not-rendering-when-type-setting-used/#post-5671105)
 * Hi Justin,
 * Thank you for the explanation!
 * I’ve went ahead and actually rebuilt my shortcodes that used “type” parameter
   to rename it to something more suitable. Hopefully there will be no conflict 
   with this parameter names for the other plugins in the future 😉
 * Thanks again. Considering this as resolved.
 * Regards,
 * Oliver

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

The topic ‘Bug: module not rendering when "type" setting used’ is closed to new 
replies.

 * ![](https://ps.w.org/beaver-builder-lite-version/assets/icon-256x256.png?rev=
   2361183)
 * [Beaver Builder Page Builder - Drag and Drop Website Builder](https://wordpress.org/plugins/beaver-builder-lite-version/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/beaver-builder-lite-version/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/beaver-builder-lite-version/)
 * [Active Topics](https://wordpress.org/support/plugin/beaver-builder-lite-version/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/beaver-builder-lite-version/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/beaver-builder-lite-version/reviews/)

## Tags

 * [declaration](https://wordpress.org/support/topic-tag/declaration/)
 * [form](https://wordpress.org/support/topic-tag/form/)

 * 6 replies
 * 2 participants
 * Last reply from: [WebMan Design | Oliver Juhas](https://wordpress.org/support/users/webmandesign/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/bug-module-not-rendering-when-type-setting-used/#post-5671105)
 * Status: resolved