Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getRowUrl doesn´t match parent Class function definition #23

Open
RonnySchueler opened this issue Sep 2, 2021 · 0 comments
Open

getRowUrl doesn´t match parent Class function definition #23

RonnySchueler opened this issue Sep 2, 2021 · 0 comments

Comments

@RonnySchueler
Copy link

Describe the bug
I just added your Modul and got an Error on the qps/index site.

Fatal error: Uncaught Error: Call to a member function setSaveParametersInSession() on boolean in /var/www/html/src/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php:66 Stack trace: #0 /var/www/html/src/app/code/core/Mage/Core/Block/Abstract.php(297): Mage_Adminhtml_Block_Widget_Grid_Container->_prepareLayout() #1 /var/www/html/src/app/code/core/Mage/Core/Model/Layout.php(459): Mage_Core_Block_Abstract->setLayout(Object(Quanta_Profiler_Model_Core_Layout)) #2 /var/www/html/src/app/code/local/Quanta/Profiler/Model/Core/Layout.php(11): Mage_Core_Model_Layout->createBlock('qps/rule', 'ANONYMOUS_31', Array) #3 /var/www/html/src/app/code/community/Mageone/Qps/controllers/Adminhtml/QpsController.php(10): Quanta_Profiler_Model_Core_Layout->createBlock('qps/rule') #4 /var/www/html/src/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mageone_Qps_Adminhtml_QpsController->indexAction() #5 /var/www/html/src/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->disp in /var/www/html/src/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php on line 66

I debuged it and the Problem is, he cant load the Grid Block.

Got the Exception:

Warning: Declaration of Mageone_Qps_Block_Rule_Grid::getRowUrl(Mageone_Qps_Model_Rule $row): string should be compatible with Mage_Adminhtml_Block_Widget_Grid::getRowUrl($item) in /var/www/html/src/app/code/community/Mageone/Qps/Block/Rule/Grid.php on line 3

So this Warning causes and Exception and then you get false as Container and on false there is no function "setSaveParametersInSession".

To fix this this error, just remove the type declaration "Mageone_Qps_Model_Rule" in the Mageone_Qps_Block_Rule_Grid on the function getRowUrl.

Means:

public function getRowUrl(Mageone_Qps_Model_Rule $row): string

to

public function getRowUrl($row): string

because the parent function don´t have any type declaration.

Greetings Ronny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant