I Think I Found A Bug

Using 9.1.3 on php 8.1.14
/index.php/dashboard/system/express/entities/forms/view_form_details
Add a Form Control.
Select ‘Text’ from core properties. (Seemingly does nothing)
Click X to close.
Reload page.
Returns ‘Undefined variable $label’ and blocks access to the Form.

Work-around: /concrete/src/Entity/Express/Control/TextControl.php

public function getControlLabel()
{
$label = null; /* ADDED TO SUPPRESS ERROR */
if ($this->getHeadline()) {
$label = h($this->getHeadline());
} else if ($this->getBody()) {
$text = \Core::make(‘helper/text’);
$label = $text->sanitize($this->getBody(), 32);
}

    $label .= ' ' . t('(Text)');
    return $label;

}

I imagine this is a super rare occurrence but would throw a wrench in someones site if they happened to accidentally click on the Core Property ‘Text’ ten times because it wasnt adding thinking it was instead the Custom Attribute they created… like I did.

Let me know if there is a more appropriate place to post this.
C

Bug reports should be made on GitHub - Issues · concretecms/concretecms · GitHub

Thanks. I’ve submitted it.

1 Like