PaulV888
Member
Hi, I have numerous dropdowns that are setup with numeric key values and are defined as an INT in the db.
These do not show labels anymore after upgrading.
Front-end
Setup
DB
Can we fix this by converting the search value in components/com_fabrik/model/elements.php/getLabelForValue to a string? Which seems to be working.
Or should I convert all integer dropdowns to varchar?
Thanks,
Fabrik 4 Gamma2
Joomla! 4.2.8 Stable
PHP Version 8.1.2-1ubuntu2.10
Apache/2.4.52
MySql: 8.0.32
These do not show labels anymore after upgrading.
Front-end
Setup
DB
Can we fix this by converting the search value in components/com_fabrik/model/elements.php/getLabelForValue to a string? Which seems to be working.
PHP:
public function getLabelForValue($v, $defaultLabel = null, $forceCheck = false)
{
/**
* $$$ hugh - only needed getParent when we weren't saving changes to parent params to child
* which we should now be doing ... and getParent() causes an extra table lookup for every child
* element on the form.
* $element = $this->getParent();
*/
$params = $this->getParams();
$values = $this->getSubOptionValues();
$labels = $this->getSubOptionLabels();
--> $key = array_search(strval($v), $values, true);
Or should I convert all integer dropdowns to varchar?
Thanks,
Fabrik 4 Gamma2
Joomla! 4.2.8 Stable
PHP Version 8.1.2-1ubuntu2.10
Apache/2.4.52
MySql: 8.0.32