Hi - can anybody point me in the right direction with this error?
I have just upgraded from v2.4.0 to v2.4.1
When I run 'bin/magento setup:upgrade' I get the following error:
Declaration of Mageplaza\LayeredNavigation\Model\Layer\Filter\Price::_renderRangeLabel($fromPrice, $toPrice) should be compatible with Magento\CatalogSearch\Model\Layer\Filter\Price::_renderRangeLabel($fromPrice, $toPrice, $isLast = false) in /app/code/Mageplaza/LayeredNavigation/Model/Layer/Filter/Price.php on line 156
I have the Porto theme installed which includes this module.
Solved! Go to Solution.
In the file Mageplaza\LayeredNavigation\Model\Layer\Filter\Price check for a method named _renderRangeLabel() . The method will probably look like this:
_renderRangeLabel($fromPrice, $toPrice)
If that is the case, change it so that it reads:
_renderRangeLabel($fromPrice, $toPrice, $isLast = false)
Ideally you would upgrade the Porto theme which should fix the issue but the above should also work if that's not an option.
In the file Mageplaza\LayeredNavigation\Model\Layer\Filter\Price check for a method named _renderRangeLabel() . The method will probably look like this:
_renderRangeLabel($fromPrice, $toPrice)
If that is the case, change it so that it reads:
_renderRangeLabel($fromPrice, $toPrice, $isLast = false)
Ideally you would upgrade the Porto theme which should fix the issue but the above should also work if that's not an option.
Hi - thanks for the reply.
Funnily enough, I got an email informing me that there was a new version of Porto the day after I posted this message.
I upgraded Magento again, upgraded Porto and then ran 'bin/magento setup:upgrade' which resolved the problem.