mage-enhanced-admin-grids
mage-enhanced-admin-grids copied to clipboard
1.0.0 wip edge
I using 1.0.0 version.
Looks it has bug, Can you check it? BL/CustomGrid/Block/Widget/Grid/Column/Renderer/Text.php
56 Line
`if (($truncationMode = $this->getColumn()->getTruncationMode())
&& ($truncationMode != self::TRUNCATION_MODE_NONE)) {
/** @var $stringHelper BL_CustomGrid_Helper_String */
$stringHelper = $this->helper('customgrid/string');
$truncationLength = (int) $this->getColumn()->getTruncationAt();
$truncationEnding = $this->getColumn()->getTruncationEnding();
$exactTruncation = (bool) $this->getColumn()->getExactTruncation();
$remainder = '';
if ($truncationMode == self::TRUNCATION_MODE_HTML) {
$textValue = $stringHelper->truncateHtml(
$textValue,
$truncationLength,
$truncationEnding,
!$exactTruncation
);
} elseif ($truncationMode == self::TRUNCATION_MODE_TEXT) {
$textValue = $stringHelper->truncateText(
$textValue,
$truncationLength,
$truncationEnding,
$remainder,
!$exactTruncation
);
}
}
` $truncationLength value always 0, $truncationEnding also empty.
It related with adding text field grid > rendering > truncation setting in catalog/product page. $truncationMode return right value as setting, but 'Truncate at n-th character', 'Truncate ending string' value doesn't return it.
as it result, when Truncate => yes, custom field show empty value. ( truncationLength==0, return '' ) I tested it php7 and php 5.6
$truncationLength value always 0, $truncationEnding also empty.
I do not see this. Does have value.
In this image Ending is hyphen which is correct Lenght tested too was also correct
However: I do agree that even then - it does not work as expected .... that we see also.
