CB loses params when parsing a snippet call

Prel.

  • CB version 1.12.2 (not updatable due to customer policy)
  • CB Field, input type “snippet” with a bunch of additional settings
  • Snippet with a few default parameters

Case:

  • add CB field, set some CB settings, add some snippet params → no problems
  • if one snippet parameter is set to “1” all CB field settings are lost in the parsed snippet call.

correct: (all CB field params are included)

Wrong / lost parameters:

Anybody knows why this behaves like this?

Found an error in the snippet snippetinput.class.php on line 88:

 foreach($data as $key => $val) {
            if(!is_array($val) && $val != '' && (isset($data['snippet_properties']) && !in_array($key, $data['snippet_properties'])) && !in_array($key, $strip_properties)) {
                $properties[] = "&$key=`$val`";
     }
}

&& !in_array($val, $data['snippet_properties']
sould be
&& !in_array($key, $data['snippet_properties']

Where can I make a bug report?

1 Like

Write to Mark (& Murray) at support@modmore.com :+1:t4:

It’s fine to just leave it here as well - just caught us right before my break. I’ve logged an issue referencing this topic and we’ll take a look for the next CB release.