Magento – Magento2 admin custom module throwing the error

errormagento-2.1

I created a custom module in magento2 for admin panel. Grid form is version fine. But When I tried to add/edit a record then its throwing the error like "Changes have been made to this section that have not been saved. This tab contains invalid data. Please resolve this before saving."

Magento version is 2.1.1.

I am unable to find any clue in logs.

System.log file has follow error.

[2017-03-20 09:16:25] main.CRITICAL: Broken reference: the 'header'
tries to reorder itself towards 'global.notices', but their parents
are different: 'page.wrapper' and 'notices.wrapper' respectively. []
[]

[2017-03-20 09:16:25] main.CRITICAL: Broken reference: the
'page.breadcrumbs' tries to reorder itself towards 'notifications',
but their parents are different: 'page.wrapper' and 'notices.wrapper'
respectively. [] []

[2017-03-20 09:16:25] main.CRITICAL: Broken reference: the
'global.search' tries to reorder itself towards
'notification.messages', but their parents are different:
'header.inner.right' and 'header' respectively. [] []

[2017-03-20 09:16:30] main.INFO: Cache file with merged layout:
LAYOUT_adminhtml_STORE1_3d41d8cd98f00b204e9800998ecf8427e and handles
: Please correct the XML data and try again. [] []

[2017-03-20 09:16:33] main.CRITICAL: Broken reference: the 'header'
tries to reorder itself towards 'global.notices', but their parents
are different: 'page.wrapper' and 'notices.wrapper' respectively. []
[]

[2017-03-20 09:16:33] main.CRITICAL: Broken reference: the
'page.breadcrumbs' tries to reorder itself towards 'notifications',
but their parents are different: 'page.wrapper' and 'notices.wrapper'
respectively. [] []

[2017-03-20 09:16:33] main.CRITICAL: Broken reference: the
'global.search' tries to reorder itself towards
'notification.messages', but their parents are different:
'header.inner.right' and 'header' respectively. [] []

Content of Namespace_Module_redirectdata_edit.xml file is:

<?xml version="1.0"?><page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<update handle="editor"/>
<body>
    <referenceContainer name="content">
        <block class="Techies\Customredirect\Block\Adminhtml\Redirectdata\Edit" name="techies_customredirect_redirectdata_edit"/>
    </referenceContainer>
    <referenceContainer name="left">
        <block class="Techies\Customredirect\Block\Adminhtml\Redirectdata\Edit\Tabs" name="techies_customredirect_redirectdata_tabs">
            <block class="Techies\Customredirect\Block\Adminhtml\Redirectdata\Edit\Tab\Redirectdata" name="techies_customredirect_redirectdata_edit_tab_redirectdata"/>
            <action method="addTab">
                <argument name="name" xsi:type="string">redirectdata</argument>
                <argument name="block" xsi:type="string">techies_customredirect_redirectdata_edit_tab_redirectdata</argument>
            </action>
        </block>
    </referenceContainer>
</body>

Error thrown in browser is:

enter image description here

Best Answer

You should check for PHP errors in the server logs.

If you have a PHP error while generating some block, it can result in stopping the code execution, displaying this message.

Most probably it's an error in one of your blocks you're calling on that page in the "Redirect Information" tab.

Related Topic