Magento2: Notice: Undefined index: label in /vendor/magento/module-backend/Block/Widget/Grid/Column/Filter/Select.php on line 73

Created on 13 Apr 2016  路  26Comments  路  Source: magento/magento2

Hello, when tried to go to Sales -> Transactions menu in backend, I got this error just after I clicked on it:

Notice: Undefined index: label in /home/depasa/public_html/vendor/magento/module-backend/Block/Widget/Grid/Column/Filter/Select.php on line 73

0 /home/depasa/public_html/vendor/magento/module-backend/Block/Widget/Grid/Column/Filter/Select.php(73): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', '/home/depasa/pu...', 73, Array)

1 /home/depasa/public_html/vendor/magento/module-backend/Block/Widget/Grid/Column.php(488): Magento\Backend\Block\Widget\Grid\Column\Filter\Select->getHtml()

2 /home/depasa/public_html/vendor/magento/module-backend/view/adminhtml/templates/widget/grid/column_set.phtml(42): Magento\Backend\Block\Widget\Grid\Column->getFilterHtml()

3 /home/depasa/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/home/depasa/pu...')

4 /home/depasa/public_html/vendor/magento/framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Backend\Block\Widget\Grid\ColumnSet), '/home/depasa/pu...', Array)

5 /home/depasa/public_html/vendor/magento/framework/View/Element/Template.php(279): Magento\Framework\View\Element\Template->fetchView('/home/depasa/pu...')

6 /home/depasa/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(657): Magento\Framework\View\Element\Template->_toHtml()

7 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Element\AbstractBlock->toHtml()

8 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('sales.transacti...')

9 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('sales.transacti...')

10 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('sales.transacti...')

11 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('sales.transacti...', true)

12 /home/depasa/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(497): Magento\Framework\View\Layout\Interceptor->renderElement('sales.transacti...', true)

13 /home/depasa/public_html/vendor/magento/module-backend/view/adminhtml/templates/widget/grid.phtml(133): Magento\Framework\View\Element\AbstractBlock->getChildHtml('grid.columnSet')

14 /home/depasa/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/home/depasa/pu...')

15 /home/depasa/public_html/vendor/magento/framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Backend\Block\Widget\Grid), '/home/depasa/pu...', Array)

16 /home/depasa/public_html/vendor/magento/framework/View/Element/Template.php(279): Magento\Framework\View\Element\Template->fetchView('/home/depasa/pu...')

17 /home/depasa/public_html/vendor/magento/module-backend/Block/Template.php(104): Magento\Framework\View\Element\Template->_toHtml()

18 /home/depasa/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(657): Magento\Backend\Block\Template->_toHtml()

19 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Element\AbstractBlock->toHtml()

20 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('sales.transacti...')

21 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('sales.transacti...')

22 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('sales.transacti...')

23 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('sales.transacti...', true)

24 /home/depasa/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(497): Magento\Framework\View\Layout\Interceptor->renderElement('sales.transacti...', true)

25 /home/depasa/public_html/vendor/magento/module-backend/Block/Widget/Grid/Container.php(118): Magento\Framework\View\Element\AbstractBlock->getChildHtml('grid')

26 /home/depasa/public_html/vendor/magento/module-backend/view/adminhtml/templates/widget/grid/container.phtml(13): Magento\Backend\Block\Widget\Grid\Container->getGridHtml()

27 /home/depasa/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/home/depasa/pu...')

28 /home/depasa/public_html/vendor/magento/framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Sales\Block\Adminhtml\Transactions), '/home/depasa/pu...', Array)

29 /home/depasa/public_html/vendor/magento/framework/View/Element/Template.php(279): Magento\Framework\View\Element\Template->fetchView('/home/depasa/pu...')

30 /home/depasa/public_html/vendor/magento/module-backend/Block/Template.php(104): Magento\Framework\View\Element\Template->_toHtml()

31 /home/depasa/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(657): Magento\Backend\Block\Template->_toHtml()

32 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Element\AbstractBlock->toHtml()

33 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('sales_transacti...')

34 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('sales_transacti...')

35 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('sales_transacti...')

36 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('sales_transacti...', true)

37 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('sales_transacti...')

38 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('content')

39 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('content')

40 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content')

41 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('content', true)

42 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('content')

43 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('main.col')

44 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.col')

45 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.col')

46 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.col', true)

47 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('main.col')

48 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('admin.scope.col...')

49 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('admin.scope.col...')

50 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('admin.scope.col...')

51 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('admin.scope.col...', true)

52 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('admin.scope.col...')

53 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('page.main.conta...')

54 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.main.conta...')

55 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.main.conta...')

56 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.main.conta...', true)

57 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('page.main.conta...')

58 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('page.content')

59 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.content')

60 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.content')

61 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.content', true)

62 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('page.content')

63 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('page.wrapper')

64 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')

65 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')

66 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', true)

67 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')

68 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('backend.page')

69 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('backend.page')

70 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('backend.page')

71 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('backend.page', true)

72 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('backend.page')

73 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('root')

74 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')

75 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')

76 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)

77 /home/depasa/public_html/vendor/magento/framework/View/Layout.php(938): Magento\Framework\View\Layout\Interceptor->renderElement('root')

78 /home/depasa/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(492): Magento\Framework\View\Layout->getOutput()

79 /home/depasa/public_html/vendor/magento/framework/View/Result/Page.php(241): Magento\Framework\View\Layout\Interceptor->getOutput()

80 /home/depasa/public_html/vendor/magento/framework/View/Result/Layout.php(162): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))

81 /home/depasa/public_html/var/generation/Magento/Backend/Model/View/Result/Page/Interceptor.php(193): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))

82 /home/depasa/public_html/vendor/magento/framework/App/Http.php(119): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))

83 /home/depasa/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()

84 /home/depasa/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

85 {main}

Format is not valid Ready for Work bug report

Most helpful comment

I experienced this issue on Magento 2.1.6, but it was due to a custom payment extension. This was the problem with our custom extension:

The group name in the payment.xml file (example) did not match the group name in the config.xml file (example).

All 26 comments

Can you please provide more details? Version of Magento 2 and how did you deploy? Also, was this with sample data?

Version 2.02 and I have installed it using web interface with no sample data. I have only created 2 products in catalog and did some purchases.

I have the same problems when I want to look at an order in Magento 2.0.4

The Payment method with the code "substitution" has no title defined in configuration file (module-payment/etc/config.xml)

<?xml version="1.0"?>
<!--
/**
 * Copyright 漏 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <payment>
            <free>
                <active>1</active>
                <model>Magento\Payment\Model\Method\Free</model>
                <order_status>pending</order_status>
                <title>No Payment Information Required</title>
                <allowspecific>0</allowspecific>
                <sort_order>1</sort_order>
            </free>
            <substitution>
                <active>0</active>
                <model>Magento\Payment\Model\Method\Substitution</model>
                <allowspecific>0</allowspecific>
            </substitution>
        </payment>
    </default>
</config>

That's where the "undefined index" notice comes from.

Solution?

Temporarely add that missing node:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <payment>
            <substitution>
                <title>Substitution</title>
            </substitution>
        </payment>
    </default>
</config>

This can be added from any module's config.xml. It should work.

Internal issue MAGETWO-53436

Hi @jaimestuardo , @kanduvisla ,
we can not reproduce this bug neither in 2.0.2 nor in 2.0.4 Magento version.
Please provide more details steps to reproduce.

Thanks

Just go to Sales -> Transactions option. Error appears immediately, Maybe, it is because I have the site locale to Spanish.

@adragus-inviqa I tried it but no avail:

[root@vps-1128921-x /home/depasa/public_html/app/code/Desytec/Depasa] # ll
total 12
drwxr-xr-x 2 depasa depasa 4096 mar 18 09:40 Block
drwxr-xr-x 3 depasa depasa 4096 mar 18 09:46 View
drwxr-xr-x 2 root   root   4096 may 30 09:22 etc
[root@vps-1128921-x /home/depasa/public_html/app/code/Desytec/Depasa] # cd etc/
[root@vps-1128921-x /home/depasa/public_html/app/code/Desytec/Depasa/etc] # nano config.xml
[root@vps-1128921-x /home/depasa/public_html/app/code/Desytec/Depasa/etc] # ll
total 4
-rw-r--r-- 1 root root 318 may 30 09:23 config.xml
[root@vps-1128921-x /home/depasa/public_html/app/code/Desytec/Depasa/etc] # cat config.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <payment>
            <substitution>
                <title>Substitution</title>
            </substitution>
        </payment>
    </default>
</config>
[root@vps-1128921-x /home/depasa/public_html/app/code/Desytec/Depasa/etc] #

Maybe I have to modify Magento core?

I was getting the same error showing when trying to open Salers -> Orders. Due to some other errors accessing the backend I had to disable the Paypal module. After getting back into the backend again, this also seems to be 'fixed'. You can disable it with: php bin/magento module:disable Magento_Paypal -f

Hi @jaimestuardo ,
even with Spanish locale this bug is not reproducible on 2.0.2 and 2.0.4 versions.
Seems like you have some broken code which can be caused by external extensions or not updated data or cache...
Run composer update.
Also we see that you use external extensions. Please disable them and clean cache then try to reproduce this bug. If it is still appeared please provide detailed steps to reproduce which should include all related settings you changed in Magento (e.g. enable/disable Payment methods, change locale for admin and/or website and so on).

This happened to me, only after data migration.
Don't know if this little information helps...

The problem still occurs in Magento version 2.1.7

I experienced this issue on Magento 2.1.6, but it was due to a custom payment extension. This was the problem with our custom extension:

The group name in the payment.xml file (example) did not match the group name in the config.xml file (example).

Hi, I have spent lot of time for fixing issues above all solution but still i got issues.
But when change Magento Version ie 2.1.8 so its working properly.
So basically its version issues nothing else just change your Magento version with 2.1.8

Looks like there are solutions available. We are closing this issue due to inactivity.

@magento-engcom-team I have tried all above solution still the same issue for me, please help me on this.
For me error like
main.CRITICAL: Notice: Undefined index: value in /var/www/html/m2/vendor/magento/module-backend/Block/Widget/Grid/Column/Filter/Select.php on line 72 [] []

@ParimalMakwana Have you tried on a 2.1.9 version as it was suggested above?
If the issue persists please file a report following the issue reporting guidelines.
Thank you

@magento-engcom-team Thanks for quick reply but I have tried with 2.1.8 but same issue on it.
Are you sure it will resolve with 2.1.9?

@ParimalMakwana No, we are not sure, since we do not have detailed enough information on the issue. Internal tracker shows that multiple developers attempted to reproduce it and had no result.
Please verify the issue on clean installations of 2.2.0, 2.1.9 and provide a report following the issue reporting guidelines.
We can not provide any guidance as long issue is not reproducible on our side.

@magento-engcom-team
Hey Issue resolve for me!
Actually, there was "Schogini_Beanstream" module I need to disable that was creating issue.

@ParimalMakwana Thank you for the update. Closing.

This is is still an issue in 2.1.9.

The problem lies in payment method groups being shown in the Transaction table's header. When the select button is build the payment option's groups do not have a label.

Problem can be resolved by adding the following line Magento\Payment\Helper\Data:

public function getPaymentMethodList($sorted = true, $asLabelValue = false, $withGroups = false, $store = null)
    {
        $methods = [];
        $groups = [];
        $groupRelations = [];

        foreach ($this->getPaymentMethods() as $code => $data) {
            if (isset($data['title'])) {
                $methods[$code] = $data['title'];
            } else {
                $methods[$code] = $this->getMethodInstance($code)->getConfigData('title', $store);
            }
            if ($asLabelValue && $withGroups && isset($data['group'])) {
                $groupRelations[$code] = $data['group'];
            }
        }
        if ($asLabelValue && $withGroups) {
            $groups = $this->_paymentConfig->getGroups();
            foreach ($groups as $code => $title) {
                $methods[$code] = $title;
            }
        }
        if ($sorted) {
            asort($methods);
        }
        if ($asLabelValue) {
            $labelValues = [];
            foreach ($methods as $code => $title) {
                $labelValues[$code] = [];
            }
            foreach ($methods as $code => $title) {
                if (isset($groups[$code])) {
                    $labelValues[$code]['label'] = $title;
                } elseif (isset($groupRelations[$code])) {
                    unset($labelValues[$code]);
                    // Add the line below - adds a label to the payment options' group.
                    $labelValues[$groupRelations[$code]]['label'] = $groupRelations[$code];
                    $labelValues[$groupRelations[$code]]['value'][$code] = ['value' => $code, 'label' => $title];
                } else {
                    $labelValues[$code] = ['value' => $code, 'label' => $title];
                }
            }
            return $labelValues;
        }

        return $methods;
    }

@DaimPiek's solution worked for me. I'm using Magento 2.1.9 and cannot update to a newer version due to plugins.

@erikhansen's solution worked for me on Magento 2.1.12.

Had a custom extension where the value was mistyped. Just grep for the error you could have:

grep -rn "<group>Offline" app vendor

Offline should be small caps offline

Was this page helpful?
0 / 5 - 0 ratings