cart icon indicating copy to clipboard operation
cart copied to clipboard

Undefined array key "itemsPerPage" in /vendor/extcode/cart/Classes/Controller/Backend/Order/OrderController.php line 72

Open seirerman opened this issue 3 months ago • 3 comments

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

seirerman avatar Oct 09 '25 09:10 seirerman

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
    }
}

BrandcomRob avatar Oct 20 '25 09:10 BrandcomRob

Thanks @BrandcomRob, that helped!

seirerman avatar Oct 21 '25 11:10 seirerman

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.

h-e-l-l-o-w-o-r-l-d avatar Nov 04 '25 13:11 h-e-l-l-o-w-o-r-l-d