CMS Made Simple Forums
https://forum.cmsmadesimple.org/

CGBetterforms --> Debug message
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=79193
Page 1 of 1

Author:  Gregor [ Sat Oct 06, 2018 10:58 am ]
Post subject:  CGBetterforms --> Debug message

Using CGFB versoin 1.7 I noticed the following error:
\$1:
Debug: (0.252318) - (net usage: 8640928) - (peak: 9083296)

test1 inschrijven - inschrijven



It seems to be related to this piece of code, however this is a unchanged piece of code and in place since prior versions of CGFB.

\$1:
<div class="row">
        <label><input class="radio-inline" type="radio" name="mailing" value="inschrijven" data-cgbf-label='Inschrijven' data-cgbf-selected={$form_data->mailing|default:'inschrijven'}>   Inschrijven</label>
        <label><input class="radio-inline" type="radio" name="mailing" value="uitschrijven"/>   Uitschrijven</label>
    </div>


In doing a search on "test1", I got to the class.FormRenderer.php line 131:
\$1:
$nodes = $this->getInputsByType('radio');
        if( $nodes ) {
            foreach( $nodes as $node ) {
                $tmp = $this->getAttributesArray( $node->attributes );
                if( !($attr = $node->getAttribute('data-cgbf-selected')) ) continue;
                debug_display('test1 '.$attr.' - '.$node->getAttribute('value'));
                if( $node->getAttribute('value') == $attr ) $node->setAttribute('checked','checked');
            }
        }


Any idea what is needed to solve the given error?

Author:  Rolf [ Sat Oct 06, 2018 11:09 am ]
Post subject:  Re: CGBetterforms --> Debug message

You can disable the debug message by adding //
\$1:
//debug_display('test1 '.$attr.' - '.$node->getAttribute('value'));

But please post a bug report for the developer in the Forge so he can fix this in the SVN and it will be shipped in the next module release.

grtz. Rolf

Author:  Gregor [ Sat Oct 06, 2018 12:09 pm ]
Post subject:  Re: CGBetterforms --> Debug message

Rolf \Rolf:
You can disable the debug message by adding //
\$1:
//debug_display('test1 '.$attr.' - '.$node->getAttribute('value'));

But please post a bug report for the developer in the Forge so he can fix this in the SVN and it will be shipped in the next module release.

grtz. Rolf


Modifying module files... :)
I'll create a report

Author:  Rolf [ Sun Oct 07, 2018 10:59 am ]
Post subject:  Re: CGBetterforms --> Debug message

Gregor \Gregor:
Modifying module files... :)

Correct.
Disabling one debug line in a file is in my opinion pretty different than an unsupported "fix" from a bug in a module. A "fix" that can get others in trouble later...

Author:  Gregor [ Sun Oct 07, 2018 3:59 pm ]
Post subject:  Re: CGBetterforms --> Debug message

Rolf \Rolf:
Gregor \Gregor:
Modifying module files... :)

Correct.
Disabling one debug line in a file is in my opinion pretty different than an unsupported "fix" from a bug in a module. A "fix" that can get others in trouble later...

Just kidding :)

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/