Element does not exist in HTML in Log in Browser console

startpoint

Active Member
I use custom template for details and show each element values with:
PHP:
$my_elem = $this->groups['my_group']->elements['my_elem']->element_ro;
.
In console I have this log for all elements.
Fabrik form::addElements: Cannot add element "my_table___element_name_ro" because it does not exist in HTML.
I know that Fabrik trying to find form elements Id's, but they do not need me.
This not stop properly work, but can I disable this log?
 
I saw this in one of my forms. I had not saved a form with the correct groups. Once I did that the problem went away. Not sure if this has anything to do with your situation.
 
Was it a textarea element? I recently fixed an issue with those where the ID was getting set wrong (an extra _ro on the end) that caused this console message for each textarea in details view.

If they aren't textareas, what element type(s) are they?

-- hugh
 
This log is from mootools-ext.js and viewed in chrome console->Default levels->info enabled.
It does not matter what the element is: id,date_time, field...
I use my custom template, without this code:
PHP:
foreach ($this->groups as $group) :
    $this->group = $group;
    ?>

        <div class="<?php echo $group->class; ?>" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">
          ....
        $this->elements = $group->elements;
        echo $this->loadTemplate($group->tmpl);

        if (!empty($group->outro)) : ?>
            <div class="groupoutro"><?php echo $group->outro ?></div>
        <?php
        endif;
        ?>
    </div>
<?php
endforeach;
If "info" not enabled this log is not visible.
 
Ah, OK, well if it's a custom template, and you aren't running the usual template code that outputs the element structure, then it's almost certainly because you aren't rendering the elements with the right "wrappers". Take a look at how an element is rendered in details view by the standard template. All elements will have a wrapper, usually a div, with that 'tablename___elementname_ro' ID. Our JS needs that ID so it can find the element in the DOM.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top