Magento – Magento 2.1.8 export not working

exportmagento-2.1.8product

I try to export my products in Magento 2.1.8. When i select to export products and csv files format and i press continue then showing 'Please correct the data sent value.'

Log file error:

[2018-11-26 07:44:21] main.CRITICAL: Exception: Notice: A non well
formed numeric value encountered in
/var/www/html/vendor/magento/module-catalog-import-export/Model/Export/Product.php
on line 773 in
/var/www/html/vendor/magento/framework/App/ErrorHandler.php:61 Stack
trace:

Does anyone know what caused this issue?

Best Answer

I have face same issue and resolved using below solution and every thing working fine

please change some code in below file small "m" to capital "M".

vendor/magento/module-catalog-import-export/Model/Export/Product.php

protected function getItemsPerPage() {
        if ($this->_itemsPerPage === null) {
            $memoryLimit = trim(ini_get('memory_limit'));
            $lastMemoryLimitLetter = strtolower($memoryLimit[strlen($memoryLimit) - 1]);
            switch ($lastMemoryLimitLetter) {
            case 'g':
                $memoryLimit *= 1024;
            // fall-through intentional
            case 'm':
                $memoryLimit *= 1024;
            // fall-through intentional
            case 'k':
                $memoryLimit *= 1024;
                break;
            default:
                // minimum memory required by Magento
                $memoryLimit = 250000000;
            }
To

protected function getItemsPerPage() {
        if ($this->_itemsPerPage === null) {
            $memoryLimit = trim(ini_get('memory_limit'));
            $lastMemoryLimitLetter = strtolower($memoryLimit[strlen($memoryLimit) - 1]);
            switch ($lastMemoryLimitLetter) {
            case 'g':
                $memoryLimit *= 1024;
            // fall-through intentional
            case 'M':
                $memoryLimit *= 1024;
            // fall-through intentional
            case 'k':
                $memoryLimit *= 1024;
                break;
            default:
                // minimum memory required by Magento
                $memoryLimit = 250000000;
            }
Related Topic