1

I'm getting following issue when I'm click associated products.

main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_321f776dd692abd332ec2bb61e502b692 and handles default, attachments_attachments_attachment_products: Please correct the XML data and try again. complex type 'handleType', attribute 'base': The QName value 'layoutType' does not resolve to a(n) simple type definition.
Line: 47
 [] []
[2016-07-15 13:35:01] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_3cf9ab1b1723bedc1dcd665a812b00335 and handles admin-1column: Please correct the XML data and try again. complex type 'handleType', attribute 'base': The QName value 'layoutType' does not resolve to a(n) simple type definition.
Line: 47
 [] []

enter image description here

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <block class="Magento\Framework\View\Element\Text\ListText" name="root">
      <block class="Web4pro\Attachments\Block\Adminhtml\Attachment\Edit\Tab\Product" name="attachment.edit.tab.product"/>
      <block class="Magento\Backend\Block\Widget\Grid\Serializer" name="product_grid_serializer">
        <reference name="product_grid_serializer">
          <action method="initSerializerBlock">
            <arguments>
              <argument xsi:type="string" name="grid_block_name">attachment.edit.tab.product</argument>
              <argument xsi:type="string" name="data_callback">getSelectedProducts</argument>
              <argument xsi:type="string" name="hidden_input_name">products</argument>
              <argument xsi:type="string" name="reload_param_name">attachment_products</argument>
            </arguments>
          </action>
          <action method="addColumnInputName">
            <arguments>
              <argument xsi:type="string" name="input_name">position</argument>
            </arguments>
          </action>
        </reference>
      </block>
    </block>
  </body>
</page>

Please find code below url. https://github.com/sivajik34/Magento2-Product-Attachments

1

The <reference> tag does not exist in Magento 2. You can use either <referenceBlock> or <referenceContainer>.

In your case as you're declaring the block in the same layout file as the reference you don't need it.

So you need to remove those two lines from your code:

<reference name="product_grid_serializer">
...
</reference>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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