Undefined array key "itemsPerPage" in /vendor/extcode/cart/Classes/Controller/Backend/Order/OrderController.php line 72
Bug Report
Current Behavior
Whenever I open the order module in the TYPO3 backend a PHP warning is logged:
#1476107295 TYPO3\CMS\Core\Error\Exception PHP Warning: Undefined array key "itemsPerPage" in /var/dvt/html/t3lkd/vendor/extcode/cart/Classes/Controller/Backend/Order/OrderController.php line 72
This crashes the order module in when using the development context, but still works with the production context.
"itemsPerPage" is set for the frontend in
plugin.tx_cart.settings.itemsPerPage = 20 plugin.tx_cartproducts.settings.itemsPerPage = 25
Is there another place to set it for the backend that I missed, or is this a bug?
Environment
- TYPO3 version: 12.4.37
- cart version: 10.3.0
- cart version: 6.2.0
- Is your TYPO3 installation set up with Composer (Composer Mode): yes
I had the same problem. You can add the following typoscript to your setup, and this should solve the problem.
module.tx_cart{
settings{
itemsPerPage = 20
}
}
Thanks @BrandcomRob, that helped!
Same here while updating from 10.2.4 to 10.3.0. Causing commit is https://github.com/extcode/cart/commit/e07c44fb3dd80288e453ecaf88f7991e93b4c8e2.
Note: I got the warning not just in the backend module, but also in frontend on the plugin "cart_oder". So I had to change...
For backend: https://github.com/extcode/cart/issues/704#issuecomment-3421325261 For frontent: plugin.tx_cart.settings.itemsPerPage = 20
The default value handling should be reviewed again to ensure that these values are defined correctly without having to be overwritten in sitepackages.