Closed shuffless closed 3 years ago
Tested now with a new deployment of M2.4.0 with sample data installed and PHP 7.4
The module seems to work well with the given setup. Will try to replicate the environment on the dev and come back with an update.
The dev still does not work with the same kind of setup. Still investigating the issue.
The issue is triggered at this point by the call of $this->escapeHtml($option['label'])
public function getHtml()
{
$html = '<select name="' . $this->_getHtmlName() . '" id="' . $this->_getHtmlId() . '"' . $this->getUiId(
'filter',
$this->_getHtmlName()
) . 'class="no-changes admin__control-select">';
$value = $this->getValue();
foreach ($this->_getOptions() as $option) {
if (is_array($option['value'])) {
$html .= '<optgroup label="' . $this->escapeHtml($option['label']) . '">';
foreach ($option['value'] as $subOption) {
$html .= $this->_renderOption($subOption, $value);
}
$html .= '</optgroup>';
} else {
$html .= $this->_renderOption($option, $value);
}
}
$html .= '</select>';
return $html;
}
The portion above is responsible for rendering the following dropdown:
And specifically to the <optgroup label="">
code segment.
Disabling the module to compare it seems that the configuration is messing somehow with the big gruops of payments identified below
respectively this code
<optgroup label="Offline Payment Methods">
If we replace in the code the following portion
$html .= '<optgroup label="' . $this->escapeHtml($option['label']) . '">';
to this
$html .= '<optgroup label="label">';
We can see the Netopia CC method is placed under its own payment methods group that is not actually defined, hence the error.
The issue is not affecting only the backend but also the front-end given the fact that the payment step is blocked in a loading state when a user goes to payment step
Tested now with a new deployment of M2.4.0 with sample data installed and PHP 7.4
The module seems to work well with the given setup. Will try to replicate the environment on the dev and come back with an update.
Tested again and the transactions tab does not appear in the order details, yet the error does not trigger on this page.
The transaction is present but the table is not displayed, therefore I cannot replicate the payment method filter from the other instance.
Fixable by this pull https://github.com/mobilpay/Magento/pull/19/files
Dear Shuffless
First of all thank you for using our Magento Module & testing it so well ;-) Sorry , for late answering you . I just see you already solved your problem. Yes , exactly was missing payment.xml Please, update the git, because, group ID is changed
We going to check other issue .
Solving #17 by the solution given in the issue description will not render the module to work though.
Tested on M2.4.1 with PHP 7.3.
Upon further testing several sections of the backend will result in the following error that dissapears once
$ bin/magento module:disable Netopia_Netcard
is ran so the issue is triggered by the module.I have reported this previously in #14 however the issue was dismissed due to the fact that the module was ran on M2.3.3. The symptoms were the same as the one given below.
Will test with a fresh new install of M2.4 and come back with a status.