CGBetterforms --> Debug message

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

CGBetterforms --> Debug message

Post by Gregor »

Using CGFB versoin 1.7 I noticed the following error:
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.

Code: Select all

<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:

Code: Select all

$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?
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: CGBetterforms --> Debug message

Post by Rolf »

You can disable the debug message by adding //

Code: Select all

//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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGBetterforms --> Debug message

Post by Gregor »

Rolf wrote:You can disable the debug message by adding //

Code: Select all

//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
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: CGBetterforms --> Debug message

Post by Rolf »

Gregor wrote: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...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGBetterforms --> Debug message

Post by Gregor »

Rolf wrote:
Gregor wrote: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 :)
Post Reply

Return to “Modules/Add-Ons”