0

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?

3
  • I have solved this by activating "set_time_limit" on my server, after debugging a few hours...
    – Dani
    Apr 23, 2019 at 8:36
  • The sentence becomes fragment after edit. It is an incomplete sentence now.
    – fmsthird
    Apr 23, 2019 at 9:17
  • Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review Apr 23, 2019 at 12:38

1 Answer 1

2

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;
            }
3
  • As per mention above change but not working in My Magento 2.2.5. Can you tell me another solution?
    – Nikul
    Apr 30, 2019 at 7:51
  • Thanks, it worked in Magento 2.2.5 pretty weird. Mar 9, 2020 at 15:43
  • I am installed Magento using GitHub INstallation, my Magento configuration under app/code/magento, where i can find Product.php?
    – zus
    Nov 9, 2020 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.